I am working on a GUI program that involves uploading a txt file. The first 80 lines of the file contains information I do not need, it is a mix of numeric and text data. For example here is a few lines of the data I do not want to use;
vertical_line_flag;0
vertical_line_ratio;0
laser_wavelength;0
laser_powerlevel;0
overlay_js;0
Relative Intensity Correction Flag;0
Pixel;Wavelength;Wavenumber;Raman Shift;Dark;Reference;Raw data #1;Dark Subtracted #1;%TR #1;Absorbance #1;Irradiance (lumen) #1;
0;165.98;60247.73;-60247.73;0.0000;65535.0000;1125.0000;31.0000;0.0000;0.0000;0.0000;
1;166.38;60103.59;-60103.59;0.0000;65535.0000;549.0000;-545.0000;0.0000;0.0000;0.0000;
2;166.78;59960.14;-59960.14;0.0000;65535.0000;0.0000;-1094.0000;0.0000;0.0000;0.0000;
3;167.18;59817.38;-59817.38;0.0000;65535.0000;998.0000;-96.0000;0.0000;0.0000;0.0000;
4;167.57;59675.31;-59675.31;0.0000;65535.0000;1046.0000;-48.0000;0.0000;0.0000;0.0000;
5;167.97;59533.90;-59533.90;0.0000;65535.0000;1020.0000;-74.0000;0.0000;0.0000;0.0000;
6;168.37;59393.17;-59393.17;0.0000;65535.0000;1003.0000;-91.0000;0.0000;0.0000;0.0000;
7;168.77;59253.11;-59253.11;0.0000;65535.0000;1051.0000;-43.0000;0.0000;0.0000;0.0000;
8;169.17;59113.71;-59113.71;0.0000;65535.0000;1024.0000;-70.0000;0.0000;0.0000;0.0000;
9;169.56;58974.97;-58974.97;0.0000;65535.0000;1045.0000;-49.0000;0.0000;0.0000;0.0000;
10;169.96;58836.88;-58836.88;0.0000;65535.0000;1091.0000;-3.0000;0.0000;0.0000;0.0000;
11;170.36;58699.44;-58699.44;0.0000;65535.0000;1064.0000;-30.0000;0.0000;0.0000;0.0000;
12;170.76;58562.65;-58562.65;0.0000;65535.0000;1019.0000;-75.0000;0.0000;0.0000;0.0000;
The point where the numbers begin, as in the line after (lumen) #1; is the data that I want to use in my program.
I have tried using this code to skip the first 80 lines of the file
[FileName,PathName]= uigetfile('*.txt*','Files to Study');
file =fullfile(PathName,FileName);
fid = fopen(file);
A = textscan(fid,'%f' ,'HeaderLines',80);
but this results in A= [0x1 double]
Any suggestions on how to resolve this would be greatly appreciated.