I have a text file as an output of a c++ program. Its actually a 3x100x200 element matrix. 3×100 2d matrices over 200 timestamps. I want to store this such that I can load it in Matlab workspace and then visualize it in a 3d plot. I am not able to figure out the structure of the text file. As in where should I put a “[..]” and where “;” and where a ” ” or “,”.
Could someone please give an example so that I can print out in the file from the c++ code in a that manner
I found a hack without using any extra libs.
I just output every 2d matrix as outMat(:,:,matIndex) and incremented matIndex in a loop. And then I ran the .m in matlab as a script.
Thanks everyone for your answers.
For some answers I wasnt clear enough I guess, because they assumed I want to write ‘from’ Matlab and not ‘to’ Matlab while it was the other way.