Hi all. I have a txt file which shows a surgery procedure step by step. I need to find the lines with the information "New site", the file have around 23 lines with that information. I need to extract those line into an excel file.
fileId=fopen('C:\Users\G10040419\Desktop\Data 1\protokoll.txt','r'); %
while ischar(lineData) lineData=fgetl(fileId); % anytime you use fgetl you read a line and next time you use it reads next
if ~isempty(strfind(lineData,'New site no')) disp(lineData) endend
I wrote this part, but I am not sure how to continue. PS: I am new to programming and using Matlab.
Best Answer