To convert a scalar value cell into a cell array in Matlab, you can use the curly braces ({}
) to enclose the cell in a new cell array. Here's an example:
main.m146 chars9 lines
The output should be:
main.m10 chars2 lines
Note that myCellArray
is now a cell array that contains only one element, which is the original cell myCell
.
gistlibby LogSnag