syntax cellstr Error when using double as input argument
1 ビュー (過去 30 日間)
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 2022 年 7 月 14 日
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.
その他の回答 (1 件)
Fangjun Jiang 2022 年 7 月 14 日
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.