MATLAB: How to make excel file to matlab


name age grade
Fred 19 78
Joe 22 83
Sally 98 99
Charlie 21 56
If the following name and age scores are made in Excel file and run on the mat, the same form as Excel is executed on the matlab.
How can I change the order of my grades when I execute the above file?
High scores are at the top, low scores are at the bottom.

Best Answer

  • T = readtable('YourFile.xlsx');
    sortrows(T, 3, 'descending')