MATLAB: Text reader to numbers

MATLAB

I have to make a program that goes through a text file and extracts numerical values, I am having a hard time extracting those numbers, here is what I have so far. The text file also has a lot if letters associated with it to

Best Answer

filename = 'HypothesisTest2.txt';
S = fileread(filename);
temperatures = str2double( regexp(S, '^(?<=2 FAIL OPEN_CIRCUIT Int ')[\d.]+', 'match') );