Filter löschen
Filter löschen

Error message in Simulink

1 Ansicht (letzte 30 Tage)
iman
iman am 3 Jul. 2012
Hi,Help please,when i try to run my Simulink model, i obtain this error:
when i use ode45 solver:State derivatives returned by S-function 'reactor_sfcn' in 'reactor_simulink_Left1/S-Function' during flag=1 call must be a real vector of length 2
when i use ode15s solver:Nonlinear iteration is not converging with step size reduced to hmin (1.5009766490884663E-14) at time 4.2248736734541605. Try reducing the minimum step size and/or relax the relative error tolerance
I thought this error related to my solver in simulink,then i changed it but not corrected!!! please help!!!

Akzeptierte Antwort

Kaustubha Govind
Kaustubha Govind am 3 Jul. 2012
First, I think you should tackle the error that you see with the ODE45 solver - it looks like there is a problem with your S-function. How are you returning the derivatives of the states in flag=1 case? It seems that you have setup for 2 continuous states, so you need to return a vector of length 2 from mdlDerivatives (flag=1).

Weitere Antworten (0)

Kategorien

Mehr zu General Applications finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by