This is caused by a terrible beginner's mistake.
The first helping comment under the question has already shown the way.
If the online Octave is totally different from your GUI, it is probably your fault.
In order to find the problem, check the functions that might cause the difference:
>> which('num2str')
'num2str' is a function from the file C:UsersUSERNAMEAppDataLocalProgramsGNU OctaveOctave-6.1.0mingw64shareoctave6.1.0mgeneral
um2str.m
>> which('cellstr')
'cellstr' is a built-in function from the file libinterp/octave-value/ov-cell.cc
which('int2str')
>> which('int2str')
'int2str' is a variable`
Since I have for some unknown reason tested only other functions, but not the 'int2str', I accidentally found out about the error when using the shadowed function instead:
>> strcat('x', num2cell(int2str(1:10)))
error: int2str(10): out of bound 3 (dimensions are 1x3)
(note: variable 'int2str' shadows function)
For whatever reason, I had accidentally shadowed the function by assigning int2str = [1:3]
, leading to the strange behaviour.
Arbeitsumgebung = work environment:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…