Azzera filtri
Azzera filtri

Error message in Simulink

1 visualizzazione (ultimi 30 giorni)
iman
iman il 3 Lug 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!!!

Risposta accettata

Kaustubha Govind
Kaustubha Govind il 3 Lug 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).

Più risposte (0)

Categorie

Scopri di più su General Applications in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by