看板 MATLAB 關於我們 聯絡資訊
比如說我分別用Matlab跑出我要計算的ID和VG ID與VG分別是個數值array,例如 VG ID 1 4 2 5 =>這是我要的檔案格式 3 6 但是我自己寫的code如下 Vg = [1,2,3]; Id = [4,5,6]; namefile = 'IDcurrent.txt'; fileID = fopen(namefile,'w');%open file fprintf(fileID,'%6s %6s\n','Vg','Id');%s means string fprintf(fileID,'%e\n %6e\n',Vg,Id); fclose(fileID); 跑出來的檔案則是 Vg Id 1.000000e+00 2.000000e+00 3.000000e+00 4.000000e+00 5.000000e+00 6.000000e+00 請問是我哪裡需要改呢.... QQ 麻煩高手相助 謝謝!! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 128.32.44.213 ※ 文章網址: http://www.ptt.cc/bbs/MATLAB/M.1396578706.A.8C8.html
celestialgod:%6s => %6f 04/04 19:20