update source block value with GUIDE GUI
7 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!