I want to fprintf a cell array and a matrix to a txt file. I used the following code, but got the wrong result.
xx={'2017032312_8953';'2017032312_8978'}; yy=[10;11]; fprintf('%s %e \n ',xx{:}, yy)
The results is:
2017032312_8953 5.000000e+01 017032312_8978 1.000000e+01
I want the result like this:
2017032312_8953 1.0E+01 2017032312_8978 1.1e+01
How can this problem be solved? Many thanks!
Best Answer