In Matlab, to dynamically update cell array with string elements, use the following:
myCellArray = {}; %initializing cell array
for i=...
myCellArray = [myCellArray; someString]; %dyn. update cell array
end
Note that when initializing the cell array you use curly brackets "{ }", while resizing the cell array you use square brackets "[ ]".
Tuesday, July 30, 2019
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment