clc;fid = fopen('fileName','r');allText = textscan(fid,'%s','delimiter','\n')allText = strfind(allText{1}, 'Num_X='); strv =(find(~cellfun('isempty', allText)));% find position of Num_X
str = cell (11,1);fseek(fid,0,-1);for k = 1:11 str{k}= fgetl(fid);endW = str2double(str{strv});% trying to obtain number in that string.
Returns NaN .Why?
Best Answer