I am finding the path for Sine Wave block so that can replace a block in f14 model. However, when I use
find_system(simulinkModel, 'BlockType', 'Sine Wave')
The output said it empty and cannot find it
0×1 empty cell array
But if I replace Sine Wave with Step block it said
1×1 cell array
{'simulink/Sources/Step'}
Am I mistake something or SIne Wave cannot be found when using find_system

 Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 30 Nov. 2020

0 Stimmen

The 'BlockType' for the "Sine Wave" is 'Sin'.

Weitere Antworten (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov am 16 Nov. 2020

1 Stimme

You are right. Its name contains two words and because of that, supposedly it fails to locate it.

4 Kommentare

Khoi Le
Khoi Le am 16 Nov. 2020
is there any chance to fix this problem?
The solution to your exercise is to rname the block that can solve this issue. How to rename the block, see the link: https://www.mathworks.com/matlabcentral/answers/275089-rename-or-reorganize-simulink-library-blocks#:~:text=e.g.%20right%20click%20on%20the,Simulink%20models%20are%20renamed%2Fupdated.
Khoi Le
Khoi Le am 16 Nov. 2020
Bearbeitet: Khoi Le am 16 Nov. 2020
The solution for this maybe too complicated, but it can only barley accepted from some perspectives. But thanks
Good luck.

Melden Sie sich an, um zu kommentieren.

Kategorien

Community Treasure Hunt

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

Start Hunting!

Translated by