I have a working piece of code in MATLAB
empty_string = "";
bag = repmat(empty_string, 4, 1);
bag(2) = "second row";
bag(3) = "third";
However, I want to convert this to octave as MATLAB is a licensed version and everyone can't get access to it.
empty_string = blanks(1);
bag = repmat(empty_string, 4, 1);
bag(2) = "second row";
bag(3) = "third";
This gives error: =: nonconformant arguments (op1 is 1x1, op2 is 1x10)
I want each row of matrix 'bag' to be filled with uneven number of characters, please suggest how this can be done in octave. Thanks.