syntax cellstr Error when using double as input argument
3 views (last 30 days)
Life is Wonderful on 14 Jul 2022
Octave does work correctly .
n = 4;
ans = double
I run the following code, I get the error shown below. At the same time Octave does work correctly .
Error using cellstr (line 49)
Conversion to cellstr from double is not possible.
n = 4;
Walter Roberson on 14 Jul 2022
It is a bug in Octave. Octave cellstr documents that its input must be strmat, a string matrix and currently char arrays are the only implemented string matrix. But Octave cellstr is failing to check the input data type.
More Answers (1)
Fangjun Jiang on 14 Jul 2022
There is no point comparing two functions (with the same name) in two software and demanding one behaves the same way as the other. See "doc cellstr" in MATLAB for its syntax.
What do you expect cellstr(2) in MATLAB? Similar to zeros(2) or ones(2), or like below?
In fact, what is the output of cellstr(4) in Octave? It was not clear for me to see from your post.