Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [fid, message]=fopen('info1.txt','r');
- x=fread(fid,'char=>char');
- %skip the 9 first lines of the file
- for i=1:9
- fgetl(fid);
- end
- tline = fgets(fid);
- s=[];
- j=1;
- while ischar(tline)
- disp(tline);
- tline = fgetl(fid); %read line by line
- i=1;
- while double(tline(i))~=13
- if(tline(i)==':')
- while tline(i+1)~=' '
- s(j)=s(j)+tline(i+1);
- end
- else i=i+1;
- end
- end
- j=j+1;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement