How to display all calculation results in Matlab

  • Context: MATLAB 
  • Thread starter Thread starter Ein Krieger
  • Start date Start date
  • Tags Tags
    Calculation Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 3K views
Ein Krieger
Messages
32
Reaction score
0
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.
 
Physics news on Phys.org
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)
 
What do xint and yint stand for?
 
kreil said:
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)

What do xint and yint stand for?
 
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).