Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to use ODE 15s to solve this equation.

Subject: How to use ODE 15s to solve this equation.

From: Sriraam

Date: 25 Jun, 2012 00:59:07

Message: 1 of 4

Could someone please elaborate on how to use ODE 15s or 45 for this differential equation?

(1/beta) *(d alpha/dT) = ln A*(1-alpha)- (E/RT)

I have the value of alpha and E as a function of a.

I need to generate graph of alpha Vs Temperature and d alpha/dT versus Temperature.

Subject: How to use ODE 15s to solve this equation.

From: Nasser M. Abbasi

Date: 25 Jun, 2012 01:22:44

Message: 2 of 4

On 6/24/2012 7:59 PM, Sriraam wrote:
> Could someone please elaborate on how to use ODE 15s or 45 for this differential equation?
>
> (1/beta) *(d alpha/dT) = ln A*(1-alpha)- (E/RT)
>
> I have the value of alpha and E as a function of a.
>
> I need to generate graph of alpha Vs Temperature and d alpha/dT versus Temperature.
>

Just like you would do with any ode.

Need to write you differential equation in the form
    
          y' = f(t,y)

The function f(t,y) is what is called the "ode function". The
thing you put as first argument to ode45 call, as in

     [t,y]=ode45(@f,[t0 tfinal],initial_conditions);

so, it is your job to first express your ode system in the
the form y'=f(t,y). Matlab will not do that part for you. Need
paper and pencil for that. Even if your original ode was not
first order, need to convert everything to first order
ode's.

once you do that, then you can code it. In the above, y is
called the dependent variable, and 't' is the independent
variable.

see help for many examples.

--Nasser

Subject: How to use ODE 15s to solve this equation.

From: Sriraam

Date: 25 Jun, 2012 10:47:05

Message: 3 of 4

"Nasser M. Abbasi" <nma@12000.org> wrote in message <js8eh4$6et$1@speranza.aioe.org>...
> On 6/24/2012 7:59 PM, Sriraam wrote:
> > Could someone please elaborate on how to use ODE 15s or 45 for this differential equation?
> >
> > (1/beta) *(d alpha/dT) = ln A*(1-alpha)- (E/RT)
> >
> > I have the value of alpha and E as a function of a.
> >
> > I need to generate graph of alpha Vs Temperature and d alpha/dT versus Temperature.
> >
>
> Just like you would do with any ode.
>
> Need to write you differential equation in the form
>
> y' = f(t,y)
>
> The function f(t,y) is what is called the "ode function". The
> thing you put as first argument to ode45 call, as in
>
> [t,y]=ode45(@f,[t0 tfinal],initial_conditions);
>
> so, it is your job to first express your ode system in the
> the form y'=f(t,y). Matlab will not do that part for you. Need
> paper and pencil for that. Even if your original ode was not
> first order, need to convert everything to first order
> ode's.
>
> once you do that, then you can code it. In the above, y is
> called the dependent variable, and 't' is the independent
> variable.
>
> see help for many examples.
>
> --Nasser

Thank you for your suggestion. I am sorry, I am really a beginner in MATLAB while I understand the ODE.
My ode will be d(alpha)/dt = A exp (-E/R*T))(1-alpha). ie y'=f(y,T) and T=To+beta*t

Here is when it gets complicated. I need the alpha values with respect to temperature. So A and E I can provide as input at each alpha.

Subject: How to use ODE 15s to solve this equation.

From: Star Strider

Date: 25 Jun, 2012 19:26:07

Message: 4 of 4

"Sriraam" wrote in message <js8d4r$o6f$1@newscl01ah.mathworks.com>...
> Could someone please elaborate on how to use ODE 15s or 45 for this differential equation?
>
> (1/beta) *(d alpha/dT) = ln A*(1-alpha)- (E/RT)
>
> I have the value of alpha and E as a function of a.
>
> I need to generate graph of alpha Vs Temperature and d alpha/dT versus Temperature.

------------------------------------------------------------------

It might help (no promises) if you stated the expressions of alpha and E as functions of a. Are they also functions of T, and is 'a' = 'A' or is it a different function or variable?

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us