How to set SignalBuilder options (zero-crossing) programatically?

조회 수: 2 (최근 30일)
Francois Godin
Francois Godin 2018년 5월 23일
답변: Francois Godin 2018년 5월 24일
Anyone knows how to programmatically set the zero-crossing detection for a SignalBuilder? I cannot find a block property to set it. It is easily done via the Block's File menu (Simulation Option), but I need to do it via script.
thanks
Francois Godin

채택된 답변

ES
ES 2018년 5월 24일
It is not directly possible. But some workarounds exists.
https://in.mathworks.com/matlabcentral/answers/25824-is-possible-to-change-sample-time-in-signal-builder-programmatically
https://in.mathworks.com/matlabcentral/answers/10008-signal-builder-option-access-by-command-line

추가 답변 (1개)

Francois Godin
Francois Godin 2018년 5월 24일
Amazing! That was easy, thanks!
fromWS=find_system(SBHandle, 'LookUnderMasks', 'all', 'FollowLinks', 'on' ,'BlockType' ,'FromWorkspace');
fromWS=get_param(fromWS,'Handle');
set_param(fromWS,'ZeroCross','on');

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

제품


릴리스

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by