matlab help, fscanf

edited October 2006 in Science & Tech
Hi,

I have a txt file with 225 rows and 5 columns, ex:

BCC BHE 7894740.000 2000/07/11 2005/08/02

I need to search the 4th column for a certain date and then read the corresponding columns. I'm not sure how to do this in matlab or if it can be done, but I'm first trying to read the txt file in using fscanf. This is what I have so far:

fid=fopen('response_LAstations.txt');
station_name=fscanf(fid,'%s',[1]);
channel=fscanf(fid,'%2s',[2]);
gain=fscanf(fid,'%10d',[3]);

How do I read the last two columns of dates?
Also, I was trying it for one row, how do I have it read the whole file?

Thanks for the help,
Leah
Sign In or Register to comment.