フィルターのクリア

Change constant block value using push button

1 回表示 (過去 30 日間)
Nikolay Panasetsky
Nikolay Panasetsky 2015 年 12 月 3 日
コメント済み: goerk 2015 年 12 月 17 日
Hello everyone)
I want to change the value of constant block in Simulink from 0 to 1 and vice versa using push button in GUI.
function pushbutton2_Callback(hObject, eventdata, handles)
c=1
set_param('opc/Constant','value',num2str(c))
  2 件のコメント
Madhu Govindarajan
Madhu Govindarajan 2015 年 12 月 9 日
Could you explain more on what is working and what is not?
goerk
goerk 2015 年 12 月 17 日
Your code snippets look correct. Maybe you have to open/load the model first.
load_system('opc'); % or open_system('opc','loadonly')

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by