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:
The entries in tspan must strictly increase or decrease

Subject: The entries in tspan must strictly increase or decrease

From: Sanaa

Date: 22 Aug, 2013 19:48:06

Message: 1 of 2

Hi all,
I have 4 m files to create a plot and I define tspan = [0:tstep:tend];
Matlab gives me the error

??? Error using ==> funfun\private\odearguments
The entries in tspan must strictly increase or decrease.

Error in ==> ode45 at 173
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, ...

Error in ==> run at 17
    [t x] = ode45(@FODuffing,parameters,orders,ttrans,Y0,option,mu);

Error in ==> bifurcation at 20
    [t,x] = run(parameters,orders,Y0,trans,tend,tstep,mu);

strange because I have defined tspan = [0:tstep:tend]; so it's increasing.
Any explanation please?
Thanks a lot in advance.

Subject: The entries in tspan must strictly increase or decrease

From: Torsten

Date: 23 Aug, 2013 06:39:06

Message: 2 of 2

"Sanaa" wrote in message <kv5ptm$ovj$1@newscl01ah.mathworks.com>...
> Hi all,
> I have 4 m files to create a plot and I define tspan = [0:tstep:tend];
> Matlab gives me the error
>
> ??? Error using ==> funfun\private\odearguments
> The entries in tspan must strictly increase or decrease.
>
> Error in ==> ode45 at 173
> [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, ...
>
> Error in ==> run at 17
> [t x] = ode45(@FODuffing,parameters,orders,ttrans,Y0,option,mu);
>
> Error in ==> bifurcation at 20
> [t,x] = run(parameters,orders,Y0,trans,tend,tstep,mu);
>
> strange because I have defined tspan = [0:tstep:tend]; so it's increasing.
> Any explanation please?
> Thanks a lot in advance.

The call
[t x] = ode45(@FODuffing,parameters,orders,ttrans,Y0,option,mu);
to ODE45 is wrong.
Take a look at the documentation for the correct argument list.

Best wishes
Torsten.

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