file io - Matlab Importdata -


i'm writing piece of code supposed import text files using importdata , count number of columns, thought cols() function suffice this, seems imported data stored double, meaning can't perform operation.

m=importdata('title'); numcols=cols(m.data); 

am doing wrong? thought data fromthe text file stored in matrix/array?

cols specific function use in database toolbox.

you want use size function. eg:

size(m.data,2);   %returns number of columns 

fyi

size(m.data, 1); %returns number of rows. 

Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -