。 例如文本文件是:使用bash腳本替換使用bash的數字序列
<Mixture> 1 1.0000
<Mean> 39
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
<Variance> 39
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
<TransP> 3
現在我想與一些其它陣列是MATLAB variable.ie我希望它是如下
<Mixture> 1 1.0000
<Mean> 39
-3.928404e+00 -2.833521e+00 1.418979e+00 -8.560805e+00 -4.987627e+00 -5.422057e+00 -2.148949e+00 -4.035418e+00 1.111476e+00 -4.360466e+00 -2.430894e+00 -3.562756e+00 2.149250e+01 4.148085e-03 3.280356e-01 1.993892e-01 4.226578e-01 3.070029e-01 3.061973e-01 2.200327e-01 2.279716e-01 1.851751e-01 2.630977e-01 2.530313e-01 1.584220e-01 -7.420680e-02 -6.129631e-02 6.845896e-03 1.414505e-02 5.905741e-02 7.828339e-02 6.020883e-02 7.195320e-02 4.838301e-02 4.507983e-02 6.380487e-02 7.884157e-02 6.597416e-02 -1.690722e-02
<Variance> 39
1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
<TransP> 3
你嘗試了什麼,爲什麼它沒有工作?我們不爲您編寫代碼,我們幫助您修復代碼。 – Barmar 2013-03-09 08:45:22
你如何獲得替換號碼? – Barmar 2013-03-09 08:46:18
我已經存儲在matlab變量中,我想要獲取該變量的數據到指定位置的文本文件 – user2151058 2013-03-09 08:51:23