Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

fid = fopen('mydata.

dat');
mydata = textscan(fid, '%s %s %f %d %s');
fclose(fid);
whos mydata
Name Size Bytes Class Attributes
mydata 1x5 952 cell
mydata =
{3x1 cell} {3x1 cell} [3x1 double] [3x1 int32] {3x1 cell}
where
mydata{1} = {'Sally'; 'Larry'; 'Tommy'}
mydata{2} = {'09/12/2005'; '10/12/2005'; '11/12/2005'}
mydata{3} = [12.3400; 34.5600; 67.8900]
mydata{4} = [45; 54; 23]
mydata{5} = {'Yes'; 'Yes'; 'No'}

You might also like