Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to display all calculation results in Matlab

  1. May 6, 2013 #1
    Hi,

    How can I set Matlab to display all the calculation results?

    I am solving the system of ODEs with large spatial variable and time step distribution. If I set total time to 100 with time step of 1 only the results starting from t=50 are displayed.

    How to fix it?:frown:

    Thanks.
     
  2. jcsd
  3. May 7, 2013 #2

    kreil

    User Avatar
    Gold Member

    The ODE solvers don't necessarily evaluate only at the points you specify. The most important time features that the solver looks at are the start point, end point, and distance between first two time steps.

    They solve the whole system via interpolation.

    So something like sol = ode45(@odefun,[t0,tf],y0,options) generates a solution and then you evaluate the solution at any point(s) you want with yint = deval(sol,xint)
     
  4. May 7, 2013 #3
    What do xint and yint stand for?
     
  5. May 7, 2013 #4
    What do xint and yint stand for?
     
  6. May 8, 2013 #5

    kreil

    User Avatar
    Gold Member

    From the doc,

    SXINT = deval(SOL,XINT) evaluates the solution of a differential equation problem at all the entries of the vector XINT. SOL is a structure returned by an initial value problem solver (ODE45, ODE23, ODE113, ODE15S, ODE23S, ODE23T, ODE23TB, ODE15I), a boundary value problem solver (BVP4C, BVP5C), or a delay differential equations solver (DDE23, DDESD). The elements of XINT must be in the interval [SOL.x(1) SOL.x(end)]. For each I, SXINT(:,I) is the solution corresponding to XINT(I).
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: How to display all calculation results in Matlab
Loading...