I have some data in a .raw file as shown below:
ADDR,CH0,CH1,CH2,CH3,CH4,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,CH13,CH14,CAL,NUM####,ffff,ffff,ffff,ffff,ffff,ffff,ffff,ffff,ffff,ffff,ffff,ffff,ffff,ffff,ffff,ffff,#......
The first and last column indicates a number and the ffff represents a hex value. There are 13 rows in this file. I need to write a program which reads each line, and stores each line into an array(matrix) to be used later. The only column I will have to ignore is ADDR and I need and array from CH0 to NUM with all the values in each column but I'm having difficulty trying to read the file.
So far I have used this:
fid = fopen(file_raw);tline = fgetl(fid);while ischar(tline) disp(tline) tline = fgetl(fid);endfclose(fid);
But it only displays the content on the file. I would appreciate any suggestions!!
Best Answer