The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Help needed badly for a simple MATLAB looping
Replies: 4   Last Post: Jul 19, 2012 10:19 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 18,038
Registered: 12/7/04
Re: Help needed badly for a simple MATLAB looping
Posted: Jul 19, 2012 9:41 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Ramzan " <> wrote in message
> Hi All,
> Good day!
> I'm very-very new to MATLAB, and had a very limited exposure to other
> programming languages (learn an introduction course in FORTRAN but then it
> was more then 25 years ago).
> I need to calculate a transient characteristic of simple dynamic system.
> Its seems like a very simple and straight forward loop coding but i
> couldn't figure out from standard MATLAB manual in the time that is
> available to me.
> The problem as follow;
> I have some constants and initial conditions.
> Use the constants in the formulas and then simple calculate the rest. The
> output of the previous formula becomes the input of the next.
> And i'm going to recalculate those with fixed time increment, and able to
> tell the program at what time to stop.

It almost sounds like you're trying to build your own basic ODE solver. If
that's the case, and you can express the ODE as y' = f(t, y) where you know
the function f(t, y) then you can solve this using the ODE solvers included
with MATLAB. Take a look at the help and documentation for the ODE45
function as a first pass:

help ode45

doc ode45

The one concern I have is that your parameters cover widely varying orders
of magnitude. CFG turns out to be somewhere around 1e-35 while BFN is on the
order of 1e8. Using something smaller than centimeters in your expressions
(expressing TOX as the thickness in micrometers or nanometers and making
similar changes to the other parameters, perhaps?) may allow the parameters
to cover fewer orders of magnitude.

Steve Lord
To contact Technical Support use the Contact Us link on

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.