Find strings within other strings then pull data from that point
dear collegaes, please let me ask your help to find a solution for my data analisys.
I have a P0300.txt file that contains a long strip.
here is a portion of P0300.txt:
59 04 03 01 00 65 01 3E 51 09 00 00 51 1C 00 E1
I need to find sets of data, sets could be 2 or 4 digits.
lets say I need to find 01 3E
DATA = regexp(fileread(‘P0300.txt’), ‘r?n’, ‘split’)’;
>> A = string(DATA);
>> B = strfind(A,’01 3E’);
B gives me the position where 01 3E is, in this case B = 19
after this I need to extract the 6 digits on the rigth 51 09 00 <– this values can change depend on test conditions
Any idea on how can I do that?
your feedback will be highly appreciateddear collegaes, please let me ask your help to find a solution for my data analisys.
I have a P0300.txt file that contains a long strip.
here is a portion of P0300.txt:
59 04 03 01 00 65 01 3E 51 09 00 00 51 1C 00 E1
I need to find sets of data, sets could be 2 or 4 digits.
lets say I need to find 01 3E
DATA = regexp(fileread(‘P0300.txt’), ‘r?n’, ‘split’)’;
>> A = string(DATA);
>> B = strfind(A,’01 3E’);
B gives me the position where 01 3E is, in this case B = 19
after this I need to extract the 6 digits on the rigth 51 09 00 <– this values can change depend on test conditions
Any idea on how can I do that?
your feedback will be highly appreciated dear collegaes, please let me ask your help to find a solution for my data analisys.
I have a P0300.txt file that contains a long strip.
here is a portion of P0300.txt:
59 04 03 01 00 65 01 3E 51 09 00 00 51 1C 00 E1
I need to find sets of data, sets could be 2 or 4 digits.
lets say I need to find 01 3E
DATA = regexp(fileread(‘P0300.txt’), ‘r?n’, ‘split’)’;
>> A = string(DATA);
>> B = strfind(A,’01 3E’);
B gives me the position where 01 3E is, in this case B = 19
after this I need to extract the 6 digits on the rigth 51 09 00 <– this values can change depend on test conditions
Any idea on how can I do that?
your feedback will be highly appreciated strings, text, data MATLAB Answers — New Questions