I am currently opening a file and parsing arguments in the following way:
ReadParam = 'h0 = %f f0 = %f';fid = fopen(file);params = textscan(fid, readParam, 'Delimiter', '\n');fclose(fid);h0 = params{1};f0 = params{2};disp(h0);disp(f0);
However, this method assumes a specific order to h0 and f0, by the way readParam and params are defined. How would I parse the argument in such a way that order doesn't matter? This is because in "file", they can be switched (and there are more variables, this is just an example). Thanks!
Best Answer