フィルターのクリア

Simulink Constant Block multiple string input

5 ビュー (過去 30 日間)
Sumin
Sumin 2014 年 6 月 26 日
回答済み: Ajay Pherwani 2014 年 6 月 26 日
Hello,
I'm trying to make Constant Block in Simulink to take a vector of input that are variables. I plan to use fmincon and the variables a,b,c will be updated as the fmincon executes minimization.
I need to find a way to make constant block take these variables as vector and the output vector will go into another box.
Right now, I have something like this in my m file,
qq=[a b c]; set_param([simfilename '/qq'],'Value',num2str(qq));
I defined the name of the constant block to be 'qq'. This works if qq was single variable say qq=[a]. However, it doesn't work when qq is a vector. If anybody knows what I have done wrong, please let me know! Thank you.

回答 (1 件)

Ajay Pherwani
Ajay Pherwani 2014 年 6 月 26 日
instead of putting qq =[a b c] in constant block update the constant value as [ a b c ]

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by