MATLAB: Read only the numerical value of a file

read value

Hi, I have a file which is attached. I just want to read the number in it and store it in a variable. Thanks for your help.

Best Answer

This works:
filename = 'out_log_test-weak.txt';
fidi = fopen(filename,'rt');
D = textscan(fidi, '%*s%f%%', 'HeaderLines',1);
number = [D{:}]
number =
90.0800
Related Question