Initialize the masked subsystem
We can add the command 'my_test' ( running my_test.m ) by initialization pane ofthe mask editor of the subsystem. But my question is how to add 'my_test' command into the initialization pane by a matlab command line? for example, set_param?Thanks in advance. set_param(gcb,'MaskInitialization','my_test') 万分感谢呀。找MATLAB的帮助,没有找到,郁闷死了。 set_param(gcb,'MaskInitialization','my_test')
nostalgica 发表于 2009-4-23 16:57 http://forum.simwe.com/images/common/back.gif
再次请教版主, 有disp语句在我的my_test. 我发现set the param of the masked system的时候,同时也执行了一次my_test。我的问题是希望不在MATLAB命令行显示disp语句的内容,当my_test执行的时候?
BTW, 可能你会说去掉my_test 里的disp语句。但my_test还在别的地方用的,我只是希望set_param of the maskInitialization的时候,不显示。
谢谢先! 在mytest里加上:
if get_param(gcb,'userdata')==1
disp('...');
else
end
设置时用:
set_param(gcb,'userdata',0);
set_param(gcb,'MaskInitialization','mytest');
set_param(gcb,'userdata',1); 谢谢你。还有别的方法吗?我的例子比较特殊,my_test 是第三方给的,通知API拿到的,所以一般情况下,不改my_test。呵呵!我只是希望不显示disp语句内容当initialize the masked system. 没了,要不改mdl源文件吧. thanks lots.
页:
[1]