Thread Subject: differential equations matlab

Subject: differential equations matlab

From: arun

Date: 14 Dec, 2007 13:47:58

Message: 1 of 6

Hi,

i programmed a model in matlab which requires solving differential
equations numerically. i used the commands

options = odeset('AbsTol',1e-20,'RelTol',1e-4);
[t y] = ode15s(@odes, [t1 t2], icval1, options);

and wrote the eqns. The end result of the simulation is about 15
parameters. The initial condition for all are the same and are set to
a 100nM (nanomolar). The end result is the Calcium concentration.
However, the simulation result, except for 1 parameter, reduces from
100nM to about 2nM and then starts to increase and I suspect this is a
consequence of using the numerical solution to the ODE. I neither
expect nor understand as to why there should a very subtle and extreme
drop from the initial concentration when it should increase from it
and return back to the original initial concentration. I could not
post any images here as attachment. So, I could not explain it more
convincingly. Hope I have put forth my question clearly as to if some1
knows why there could be these initial dips from the initial values
while using numerical ODE's in matlab.

thank you.

Subject: differential equations matlab

From: William Dampier

Date: 14 Dec, 2007 16:10:08

Message: 2 of 6

arun <aragorn168b@gmail.com> wrote in message
<dfb3cb9d-919f-4c84-ac99-4858de986da2@d27g2000prf.googlegroups.com>...
> Hi,
>
> i programmed a model in matlab which requires solving
differential
> equations numerically. i used the commands
>
> options = odeset('AbsTol',1e-20,'RelTol',1e-4);
> [t y] = ode15s(@odes, [t1 t2], icval1, options);
>
> and wrote the eqns. The end result of the simulation is
about 15
> parameters. The initial condition for all are the same and
are set to
> a 100nM (nanomolar). The end result is the Calcium
concentration.
> However, the simulation result, except for 1 parameter,
reduces from
> 100nM to about 2nM and then starts to increase and I
suspect this is a
> consequence of using the numerical solution to the ODE. I
neither
> expect nor understand as to why there should a very subtle
and extreme
> drop from the initial concentration when it should
increase from it
> and return back to the original initial concentration. I
could not
> post any images here as attachment. So, I could not
explain it more
> convincingly. Hope I have put forth my question clearly as
to if some1
> knows why there could be these initial dips from the
initial values
> while using numerical ODE's in matlab.
>
> thank you.


If you can post a copy of the @odes function we can be a
little more help. I have a lot of experience teaching
biochemical rate equations using Matlab's ODE solvers and
the problem is usually an error in the coding.

Will

Subject: differential equations matlab

From: arun

Date: 14 Dec, 2007 23:24:40

Message: 3 of 6

Dear Will,

The code is pretty long. How do you suggest, I paste the whole code
here???

arun.

On Dec 14, 5:10 pm, "William Dampier" <wall...@gmail.com> wrote:
> arun <aragorn1...@gmail.com> wrote in message
>
> <dfb3cb9d-919f-4c84-ac99-4858de986...@d27g2000prf.googlegroups.com>...
>
>
>
> > Hi,
>
> > i programmed a model inmatlabwhich requires solvingdifferential
> >equationsnumerically. i used the commands
>
> > options = odeset('AbsTol',1e-20,'RelTol',1e-4);
> > [t y] = ode15s(@odes, [t1 t2], icval1, options);
>
> > and wrote the eqns. The end result of the simulation is
> about 15
> > parameters. The initial condition for all are the same and
> are set to
> > a 100nM (nanomolar). The end result is the Calcium
> concentration.
> > However, the simulation result, except for 1 parameter,
> reduces from
> > 100nM to about 2nM and then starts to increase and I
> suspect this is a
> > consequence of using the numerical solution to the ODE. I
> neither
> > expect nor understand as to why there should a very subtle
> and extreme
> > drop from the initial concentration when it should
> increase from it
> > and return back to the original initial concentration. I
> could not
> > post any images here as attachment. So, I could not
> explain it more
> > convincingly. Hope I have put forth my question clearly as
> to if some1
> > knows why there could be these initial dips from the
> initial values
> > while using numerical ODE's inmatlab.
>
> > thank you.
>
> If you can post a copy of the @odes function we can be a
> little more help. I have a lot of experience teaching
> biochemical rateequationsusingMatlab'sODE solvers and
> the problem is usually an error in the coding.
>
> Will

Subject: differential equations matlab

From: William Dampier

Date: 14 Dec, 2007 23:46:54

Message: 4 of 6

arun <aragorn168b@gmail.com> wrote in message
<92e0fb68-3e4f-4dad-95de-551356904072@a35g2000prf.googlegroups.com>...
> Dear Will,
>
> The code is pretty long. How do you suggest, I paste the
whole code
> here???
>
> arun.
>


If its over a hundred lines then you could post it in the
File Exchange and post a link here. If its less than that
you could just cut&paste here.

Subject: differential equations matlab

From: arun

Date: 15 Dec, 2007 00:12:20

Message: 5 of 6

On Dec 15, 12:46 am, "William Dampier" <wall...@gmail.com> wrote:
> arun <aragorn1...@gmail.com> wrote in message
>
> <92e0fb68-3e4f-4dad-95de-551356904...@a35g2000prf.googlegroups.com>...
>
> > Dear Will,
>
> > The code is pretty long. How do you suggest, I paste the
> whole code
> > here???
>
> > arun.
>
> If its over a hundred lines then you could post it in the
> File Exchange and post a link here. If its less than that
> you could just cut&paste here.

I have posted the link to the function for @odes here:
http://rapidshare.com/files/76627951/matlabCodeDebugHelp.m.html

arun.

Subject: differential equations matlab

From: arun

Date: 16 Dec, 2007 17:34:52

Message: 6 of 6

On Dec 15, 1:12 am, arun <aragorn1...@gmail.com> wrote:
> On Dec 15, 12:46 am, "William Dampier" <wall...@gmail.com> wrote:
>
> > arun <aragorn1...@gmail.com> wrote in message
>
> > <92e0fb68-3e4f-4dad-95de-551356904...@a35g2000prf.googlegroups.com>...
>
> > > Dear Will,
Dear Will, were you able to get the file from the link? I would like
to know your suggestions, if any.

thk you,
arun.
>
> > > The code is pretty long. How do you suggest, I paste the
> > whole code
> > > here???
>
> > > arun.
>
> > If its over a hundred lines then you could post it in the
> > File Exchange and post a link here. If its less than that
> > you could just cut&paste here.
>
> I have posted the link to the function for @odes here:http://rapidshare.com/files/76627951/matlabCodeDebugHelp.m.html
>
> arun.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com