Octave 6.1.0 (GUI)
This is a spin-off from Octave: How to turn a vector of integers into a cell array of strings?.
>> a = 1:3;
>> cellstr(int2str(a(:)))
ans =
{
[1,1] = "[square]"
}
While the output should be:
ans =
{
[1,1] = 1
[2,1] = 2
[3,1] = 3
}
How to fix this?
Only for your information and not as an answer, a workaround without this issue would be cellstr(num2str(a(:)))
.