我用下面的代碼寫的載體sortedthresh_strain
和probofdetectionanddelamprop1
到一個文本文件中。然而,文本文件輸出如下:寫入數據的列到一個文本文件
0.0030672 1.6592e-080.0033489 5.1721e-080.0034143
其中0.0033489 5.1721e-08應該是對文本文件的下一行。即它應該是:
0.0030672 1.6592e-08
0.0033489 5.1721e-08
我不確定如何做到這一點。
編輯:使用建議的回答: 0.0049331 0.0049685 0.0049894 0.0050094 0.005156 0.0051741 0.0052139 0.0053399 0.0054486 0.0056022 7.0711e-213.0123e-19
第二列需要包含:
7.0711e-21
3.0123e-19
而且,
dlmwrite('THRESHUNCERTAINTYFINALPLOTLSIGMA5.dat'[sortedthresh_strain,probofdetectionanddelamprop1],'delimiter', '\t');
看到我的答案在這裏:http://stackoverflow.com/questions/22768864/write-cell-array-into-text-file-as-two-column-data/22768954#22768954 –
@AndyCampbell謝謝,但我我正在使用R2013a。 – user131983
你有統計工具箱嗎?如果是這樣,那麼你可能想看看在工具箱中的數據集obejct這是類似的,可以導出到一個文件:http://www.mathworks.com/help/stats/dataset.export.html –