MATLAB: Reading a number from text file

fscanfnastrantext filetextscan

I am trying to read a value from a f06 file which is a general text file contains numbers, strings.I have added the text file and underlined the value that ı want to read.Can anyone help with this? Below you can find my code but it doesnt work.
clc;
clear all;
fid = fopen('composite_lamina-density.f06','r');
frmat='MASS AXIS SYSTEM \n %s %d %f %f %f';
C = fscanf(fid,frmat);
C
fclose(fid);

Best Answer

>> str = fileread('MASS.txt');
>> tmp = regexp(str,'(?<=X\s+)\d+\.?\d*E[-+]\d+','match','once');
>> str2double(tmp)
ans = 3.959280000000000