update source block value with GUIDE GUI

7 ビュー (過去 30 日間)
David Marquis
David Marquis 2015 年 10 月 19 日
I'm trying to build (and learn) Matlab GUIs. I have a small model that has several source blocks that I wan to control with my GUI. I cannot seem to get the source value to update.
Obviously, I can change the block value directly while it's simulation is running, but it won't let me do so indirectly through the GUI. Here's my GUI code. I can the error on the last line.
% Get the value input to the edit block
Count_Update = get(hObject,'Value');
% Update the model's Sensor Count source block
set_param([bdroot '/Sensor Count'],'Value',Count_Update);
The error is:
Error using SpookfishConfiguration_GUI>edit_SensorCount_Callback (line 92)
Invalid setting in Constant block 'Sensor Count' for parameter 'Value'

回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by