importing state space models to simulink

Hello! I am working on a matlab project now, and I will shortly need to start building blocks in a simulink model. My question is very simple, is there a way to import a state space model (saved in the current forlder, or available in the workspace) directly into a simulink model without having to copy and paste all the matrixes (A B C and D) into the silly GUI simulink wants one to use? I need to move over some very large ss models and I really want to avoid all the hassle of copy-pasting. I would be very grateful for any advice.

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 7 月 22 日

1 投票

A=[-2 1;-3 0];
B=[0;1]
C=[1 0]
D=0
set_param('untitled/State-Space','A','A','B','B','C','C','D','D')
% untitled is the name of your simulink model,
%State-Space is the name of your State space block

1 件のコメント

John
John 2014 年 7 月 23 日
Thanks Azzi, this works a treat! Now on to my other Simulink issues :/

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

質問済み:

2014 年 7 月 22 日

コメント済み:

2014 年 7 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by