Effacer les filtres
Effacer les filtres

I am getting following error while using Simulink.B​lockDiagra​m.createSu​bsystem. I am using MATLAB 2015b.

5 vues (au cours des 30 derniers jours)
function convert2subsys(sys) blocks = find_system(sys, 'SearchDepth', 1); bh = []; for i = 2:length(blocks) bh = [bh get_param(blocks{i}, 'handle')]; end Simulink.BlockDiagram.createSubsystem(bh); end
Undefined function 'createSubsystem' for input arguments of type 'Simulink.BlockDiagram'.
Error in convert2subsys (line 7) Simulink.BlockDiagram.createSubsystem(bh);

Réponses (1)

Deepak
Deepak le 9 Nov 2017
Hi Prasanna,
The API used to create a subsystem in 2015b version is 'Simulink.BlockDiagram.createSubSystem'. Here is the documentation page for the function: https://www.mathworks.com/help/releases/R2015b/simulink/slref/simulink.blockdiagram.createsubsystem.html
Hope this helps!
Thanks, Deepak

Catégories

En savoir plus sur Simulink Functions dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by