MATLAB: Produce a cell array of cell arrays of element names

creation of cell array of element names

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

Best Answer

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