MATLAB Answers

produce a cell array of cell arrays of element names

조회 수: 3(최근 30일)
Anju Mohokar
Anju Mohokar 31 Oct 2019
댓글: Anju Mohokar 12 Nov 2019
I want to create a cell from a cell arrays of simulink. elements present in matlab workspace. I have tried with below command in matlab 2019b
element_names = getElementNames{elements}; // whereas elements is the name of cell in workspace with all elements.
and getting below error:
error.JPG

  댓글 수: 0

로그인 to comment.

채택된 답변

YT
YT 31 Oct 2019
If getElementNames is a function, you should use round brackets instead of curly brackets:
element_names = getElementNames(elements);

  댓글 수: 3

Anju Mohokar
Anju Mohokar 1 Nov 2019
Tried using round brackets still getting below error due to type cell:
error.JPG
YT
YT 1 Nov 2019
You should check the documentation, which states you should input a Simulink.SimulationData.Dataset object, not just a cell:
element_list = getElementNames(dataset) returns the names of all of the elements in the Simulink.SimulationData.Dataset object.

로그인 to comment.

추가 답변(0개)

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by