arrays - Matlab : Storing large numbers -


my csv file looks this

'have', 1436271616097.0, 33.0, 'nochange', 1436271538982.0 'four', 1436271616130.0, 466.0, 'nochange', 1436271538982.0 'have', 1436271616596.0, 467.0, 'nochange', 1436271538982.0 'four', 1436271617063.0, 100.0, 'nochange', 1436271538982.0 

i tried using [num, txt, raw] = csvread('test.csv') shows error saying many output arguments.

i tried converting csv file .xlsx changes numbers this,

have    1.44e+12    33   nochange   1.44e+12 4    1.44e+12    466  nochange   1.44e+12 have    1.44e+12    467  nochange   1.44e+12 4    1.44e+12    100  nochange   1.44e+12 minutes 1.44e+12    666  nochange   1.44e+12 

then used [num, txt, raw] = xlsread('test.xls') problem if display eyet = vpa(eyet(:,1)) shows same float value. how can use textscan this?

this short example using textscan mentioned csv-file. gives cell array each column.

% reading data file = fopen('file.csv'); f = textscan(file,'%s %f %f %s %f','delimiter',',');  format long    % show digits of large number celldisp(f)    % display values of cells 

this result:

f{1}{1} = 'have' f{1}{2} = 'four' f{1}{3} = 'have' f{1}{4} = 'four' f{2} =    1.0e+12 *    1.436271616097000    1.436271616130000    1.436271616596000    1.436271617063000 f{3} =     33    466    467    100 f{4}{1} = 'nochange' f{4}{2} = 'nochange' f{4}{3} = 'nochange' f{4}{4} = 'nochange' f{5} =    1.0e+12 *    1.436271538982000    1.436271538982000    1.436271538982000    1.436271538982000 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -