Hello!!!!
I have to write a text file containg array and text header. My numeric array is in size of 33731x48. I knew that I can use fprint to output text file, but my double array has too many columns. I don't know how to set up the formatting operator for all double array element. I want all element to be floating point number (%f). I am thinking about writing 48 %f inside fprintf function For example,
fprintf(fid, '%f %f %f... %f r\n', array);
and there are 48 %f inside fprintf function, but it should be better way. So, could you please help me giving some advice?
2 Comments
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/451842-how-to-write-txt-file-contain-double-array-and-text-header#comment_684650
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/451842-how-to-write-txt-file-contain-double-array-and-text-header#comment_684650
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/451842-how-to-write-txt-file-contain-double-array-and-text-header#comment_684654
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/451842-how-to-write-txt-file-contain-double-array-and-text-header#comment_684654
Sign in to comment.