MATLAB: How can i skiping a line in fscanf

findfopenfscanfstrfindtext;textscan

i want to say to matlab find 'RF1' and then go to next line and read its value . my text file is like bellow and i need to each time matlab read RF1's value .
my reaction forces RF1 RF2 RF3 MR3
250 253 88 555 22

Best Answer

ADDENDUM Update to reflect result of long subsequent conversation...dpb
% file opening preamble here...
data=[];
while ~feof(fid) % find the wanted output section first...
if strfind(fgetl(fid),'N O D E O U T P U T'), break, end
end
% now find the RF1 text looking for; ensure is full word and skip two lines
while ~feof(fid)
l=fgetl(fid); % get a line
if strfind(l,' RF1 ')
data=cell2mat(textscan(fid,'%*f %f %*[^\n]',1,'headerlines',2));
end
end
Above uses dynamic reallocation which isn't very efficient but if the file isn't terribly long and only doing it once, shouldn't be too bad...if is large, then preallocate an array and populate it and test for overrun before writing into it...
Also note that if anything else changes in the general file format, the above may break again -- particularly as mentioned in the earlier comments if other text were to show up in the NOTE section that took more than the same single line the 'headerlines' count would have to be adjusted for however many records were actually between the header record and the data record.