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

 Réponse acceptée

Guy Rouleau
Guy Rouleau le 30 Juin 2011
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:

Plus de réponses (1)

Paulo Silva
Paulo Silva le 29 Juin 2011
My suggestion is for you to provide more details and/or that .m code you talk about

Catégories

En savoir plus sur Modeling dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by