I am trying to sort the attached file first by column 1, then by column 3. I have tried the following code:
fid = fopen(filename);
data = textscan(fid, '%s %f %f');
fclose(fid);
matrix_data = [data{:}];
sort_data = sortrows(matrix_data, [1,3]);
This tells me that CAT arguments dimensions are not consistent.
Could someone tell me what is wrong with this code?
Thanks.
Best Answer