i have list of strings in char array:
'gvs(0.000000000000000e+000, 1.601985139535780e+002)' 'gvs(-5.000000000000000e-005, 1.365231866954370e+002)' 'gvs(-1.000000000000000e-004, 1.169431404340180e+002)' 'gvs(-5.000000000000000e-004, 3.187711314514890e+001)' 'gvs(-2.000000000000000e-004, 8.589930648472340e+001)'
which trying convert array of numbers (ignoring gvs, comma , brackets), can't quite work out i'm doing wrong?
cols = length(variables) + length(parameters); % unused rows = length(results); = 1:rows; res(a,:) = sscanf ((results{a,1}(1,:)),'%*s %f %f'); end
i've tried textscan, can't work right either
for = 1:rows; res = cell (textscan ((results{a,1}(1,:)),'%*s %f %f','delimiter', {'(',' '},'multipledelimsasone',1)); end
any appreciated!
thanks
replace
res(a,:) = sscanf ((results{a,1}(1,:)),'%*s %f %f');
with
res(a,:) = sscanf ((results{a,1}(1,:)),'gvs(%f, %f)');
Comments
Post a Comment