In Octave, when using the save function, you need to do something like this:
myfilename = "stuff.txt"; mystruct = [ 1 2; 3 4] save("-text", myfilename, "mystruct");
The stuff.txt file will be created in the above code, and the matrix data will be placed there.
The above code will only work when mystruct is a matrix, if you have a row cell, it will fail. For them you can roll yourself:
xKey = cell(2, 1); xKey{1} = "Make me a sandwich..."; xKey{2} = "OUT OF BABIES!"; outfile = fopen("something.txt", "a"); for i=1:rows(xKey), fprintf(outfile, "%s\n", xKey{i,1}); end fflush(outfile); fclose(outfile);
source share