I have a cell array that is declared as follow :
testCellArray = cell(m, n);
In a script, I specify the value of each cell as follow :
for loop (ii)
testCellArray{ii, 1} = str2num(value1{ii});
testCellArray{ii, 2} = str2num(value2{ii});
testCellArray{ii, 3} = str2num(value3{ii});
testCellArray{ii, 4} = str2num(value4{ii});
...
testCellArray{ii, n} = str2num(valuen{ii});
end
I'm unable to put this in one line (I'm pretty sure it is possible).
I've tried something like this :
testCellArray{ii, :} = deal(str2num(value1{ii}, value2{ii}, value3{ii}, value4{ii}, ..., valuen{ii}))
But it isn't working. I'm also not sure if I should use testCellArray{ii, :} or testCellArray(ii, :).