我想知道我們應該如何從包含字符串,雙打和字符一個複雜的CSV文件讀取等如何導入複雜的CSV文件導入數字矢量到Matlab
例如,你可以請提供了成功的可以在這個csv文件中提取數值的命令?
點擊here。
例如:
yield curve data 2013-10-04
Yields in percentages per annum.
Parameters - AAA-rated bonds
Series key Parameters Description
YC.B.U2.EUR.4F.G_N_A.SV_C_YM.BETA0 2.03555 Euro area (changing composition) - Government bond, nominal, all issuers whose rating is triple A - Svensson model - continuous compounding - yield error minimisation - Yield curve parameters, Beta 0 - Euro, provided by ECB
YC.B.U2.EUR.4F.G_N_A.SV_C_YM.BETA1 -2.009068 Euro area (changing composition) - Government bond, nominal, all issuers whose rating is triple A - Svensson model - continuous compounding - yield error minimisation - Yield curve parameters, Beta 1 - Euro, provided by ECB
YC.B.U2.EUR.4F.G_N_A.SV_C_YM.BETA2 24.54184 Euro area (changing composition) - Government bond, nominal, all issuers whose rating is triple A - Svensson model - continuous compounding - yield error minimisation - Yield curve parameters, Beta 2 - Euro, provided by ECB
YC.B.U2.EUR.4F.G_N_A.SV_C_YM.BETA3 -21.80556 Euro area (changing composition) - Government bond, nominal, all issuers whose rating is triple A - Svensson model - continuous compounding - yield error minimisation - Yield curve parameters, Beta 3 - Euro, provided by ECB
YC.B.U2.EUR.4F.G_N_A.SV_C_YM.TAU1 5.351378 Euro area (changing composition) - Government bond, nominal, all issuers whose rating is triple A - Svensson model - continuous compounding - yield error minimisation - Yield curve parameters, Tau 1 - Euro, provided by ECB
YC.B.U2.EUR.4F.G_N_A.SV_C_YM.TAU2 4.321162 Euro area (changing composition) - Government bond, nominal, all issuers whose rating is triple A - Svensson model - continuous compounding - yield error minimisation - Yield curve parameters, Tau 2 - Euro, provided by ECB
這些都是信息的一部分,在文件中。我試圖csvread('yc_latest.csv', 6, 1, [6,1,6,1])
來獲取值2.03555,但它給了我下面的錯誤:
Error using dlmread (line 139)
Mismatch between file and format string.
Trouble reading number from file (row 1u, field 3u) ==> "Euro area (changing composition) -
Government bond, nominal, all issuers whose rating is triple A - Svensson model - continuous
compounding - yield error minimisation - Yield curve parameters, Beta 0
Error in csvread (line 50)
m=dlmread(filename, ',', r, c, rng);
您的感謝尚不成熟。向我們展示您的代碼,您的最佳嘗試,我們可能會提供幫助。鏈接到狡猾網站上的zip文件並不鼓勵許多SOE遵循它們。 –
你能給我們一個你想如何解析一行的例子嗎? (你實際需要哪些數據) –
對不起,我剛剛編輯 – Cancan