I am trying to use textscan to read the following line from a textfile where I only want a subset of the text. The file looks like:
header line header line 1 pixel = 0.0106 Lens information can be found in Charlotte's lab notebook: book 1 page 15. other data
I want to store the numbers 1 and 15 from line 4.
My code is:
filepath='140304_1_C.txt'; fid=fopen(filepath,'r'); textscan(fid,'%s',2,'delimiter','\n'); pixelsize = textscan(fid,'1 pix = %7.5f %*[^\n]'); info = textscan(fid,'Lens information can be found in Charlotte''s lab notebook book: %f %s %f %*[^\n]');
This is not working. info returns   .
I am a novice with Matlab. Any help with this is much appreciated.