How to import complicated csv file into numerical vectors into Matlab -
i wondering how should read complicated csv file consists of strings, doubles , chars, etc.
for example, please provide successful command can extract numerical value in csv file?
click here.
for example:
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, issuers rating triple - svensson model - continuous compounding - yield error minimisation - yield curve parameters, beta 0 - euro, provided ecb yc.b.u2.eur.4f.g_n_a.sv_c_ym.beta1 -2.009068 euro area (changing composition) - government bond, nominal, issuers rating triple - svensson model - continuous compounding - yield error minimisation - yield curve parameters, beta 1 - euro, provided ecb yc.b.u2.eur.4f.g_n_a.sv_c_ym.beta2 24.54184 euro area (changing composition) - government bond, nominal, issuers rating triple - svensson model - continuous compounding - yield error minimisation - yield curve parameters, beta 2 - euro, provided ecb yc.b.u2.eur.4f.g_n_a.sv_c_ym.beta3 -21.80556 euro area (changing composition) - government bond, nominal, issuers rating triple - svensson model - continuous compounding - yield error minimisation - yield curve parameters, beta 3 - euro, provided ecb yc.b.u2.eur.4f.g_n_a.sv_c_ym.tau1 5.351378 euro area (changing composition) - government bond, nominal, issuers rating triple - svensson model - continuous compounding - yield error minimisation - yield curve parameters, tau 1 - euro, provided ecb yc.b.u2.eur.4f.g_n_a.sv_c_ym.tau2 4.321162 euro area (changing composition) - government bond, nominal, issuers rating triple - svensson model - continuous compounding - yield error minimisation - yield curve parameters, tau 2 - euro, provided ecb those part of info, in file. , tried csvread('yc_latest.csv', 6, 1, [6,1,6,1]) value 2.03555, gave me following error:
error using dlmread (line 139) mismatch between file , format string. trouble reading number file (row 1u, field 3u) ==> "euro area (changing composition) - government bond, nominal, issuers rating triple - svensson model - continuous compounding - yield error minimisation - yield curve parameters, beta 0 error in csvread (line 50) m=dlmread(filename, ',', r, c, rng);
i suggest use "import data" functionality matlab (it's in "home" toolbar).
especially notice in screenshot can generate code can automate in future. 
Comments
Post a Comment