Hello,
I have a .log file with the following type of text….
char=~=~=~=~=~=~=~=~=~= PuTTY log 2018.03.13 12:56:55 =~=~=~=~=~=~=~=~=~=~=~=$GPRMC,115508,A,5338.5495,N,00146.6252,W,0.0,284.3,130318,3.6,W,A*13$GPRMB,A,,,,,,,,,,,,V,A*1C$GPGGA,115508,5338.5495,N,00146.6252,W,1,08,0.8,62.3,M,49.0,M,,*62$GPGSA,A,3,04,,10,,,13,,17,19,20,24,28,0.0,0.8,0.8*35$GPGSV,3,1,12,04,08,102,00,06,53,201,00,10,18,320,29,11,03,032,26*70$GPGSV,3,2,12,12,09,202,25,13,51,131,40,15,74,202,25,17,21,103,34*77$GPGSV,3,3,12,19,11,122,31,20,28,224,32,24,48,262,34,28,32,049,41*74$GPGLL,5338.5495,N,00146.6252,W,115508,A,A*5D$GPBOD,,T,,M,,*47$GPVTG,284.3,T,287.9,M,0.0,N,0.0,K,A*2A$HCHDG,187.3,,,3.6,W*33$GPRTE,1,1,c,*37
I am stuck on how to extract all the data and have it in different columns. In this case I would like to have the data which is separated by commas to be inside a table but separated into different columns. At the moment I have used this line of code which puts it all inside one column:
% Open data file
fid=fopen('putty.log');line=fgetl(fid);k=1;while ischar(line) a{k,1}=line; line=fgetl(fid);k=k+1;end
Any help/direction is appreciated.
Best Answer