找回密码
 注册
Simdroid-非首页
查看: 179|回复: 7

Initialize the masked subsystem

[复制链接]
发表于 2009-4-23 14:08:53 | 显示全部楼层 |阅读模式 来自 上海
We can add the command 'my_test' ( running my_test.m ) by initialization pane of  the 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.
发表于 2009-4-23 16:57:23 | 显示全部楼层 来自 北京
Simdroid开发平台
set_param(gcb,'MaskInitialization','my_test')

评分

1

查看全部评分

回复 不支持

使用道具 举报

 楼主| 发表于 2009-4-24 09:36:32 | 显示全部楼层 来自 上海
万分感谢呀。找MATLAB的帮助,没有找到,郁闷死了。
回复 不支持

使用道具 举报

 楼主| 发表于 2009-4-24 14:35:00 | 显示全部楼层 来自 上海
set_param(gcb,'MaskInitialization','my_test')
nostalgica 发表于 2009-4-23 16:57


再次请教版主, 有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的时候,不显示。

谢谢先!
回复 不支持

使用道具 举报

发表于 2009-4-24 15:48:07 | 显示全部楼层 来自 北京
在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);
回复 不支持

使用道具 举报

 楼主| 发表于 2009-4-24 16:14:01 | 显示全部楼层 来自 上海
谢谢你。还有别的方法吗?我的例子比较特殊,my_test 是第三方给的,通知API拿到的,所以一般情况下,不改my_test。呵呵!我只是希望不显示disp语句内容当initialize the masked system.
回复 不支持

使用道具 举报

发表于 2009-4-24 16:39:52 | 显示全部楼层 来自 北京
没了,要不改mdl源文件吧.
回复 不支持

使用道具 举报

 楼主| 发表于 2009-4-24 16:51:43 | 显示全部楼层 来自 上海
thanks lots.
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Simapps系列直播

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-10-7 09:27 , Processed in 0.044852 second(s), 15 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表