Initial state vector "X0" must be a real vector of length 103.

Hello All,
I am modifying a system built in SIMULINK. The old one works. I just changed three blocks: Discrete Filter, Variable Fractional Delay and constant. I run the .m code file and always get the error message "Initial state vector "X0" must be a real vector of length 103.". I don't know how to fix it. Any help and suggestions are appreciated.
Thanks, Yihong

 Akzeptierte Antwort

Guy Rouleau
Guy Rouleau am 30 Jun. 2011

0 Stimmen

You modified a Discrete Filter, this block has states and you very likely changed the number of states. I recommend running the command Simulink.BlockDiagram.getInitialState:
This will give you the number of states in your model.
You seem to run your model using the SIM command, look at the doc for this command to learn how to pass an appropriate set of initial states:
Once you understand that, this link should be useful:

Weitere Antworten (1)

Paulo Silva
Paulo Silva am 29 Jun. 2011

0 Stimmen

My suggestion is for you to provide more details and/or that .m code you talk about

Kategorien

Mehr zu Simulink finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by