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

 採用された回答

Guy Rouleau
Guy Rouleau 2011 年 6 月 30 日

0 投票

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:

その他の回答 (1 件)

Paulo Silva
Paulo Silva 2011 年 6 月 29 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeSimulink についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by