MATLAB: How to save values in array or in .mat file by ascending order .mat filearrayascending order for i=1:10 j(i)=i*0.5: end save('j.mat', 'j') how can i save values in array or in .mat file by ascending order? Best Answer j = sort( j );save( 'j.mat', j );In your example they would already be in ascending order though. Related SolutionsMATLAB: How to save array values in .mat file in 1 column and multiple rows instead of multiple columns in 1 row. Transpose j before saving it. E.g.,j = j.'; % <-- transpose jsave('j.mat', 'j'); MATLAB: How to find max and min value from .mat file and save it to an other array S = load('j.mat', 'j'); minmax = [min(S.j) max(S.j)]; save('jminmax.mat', minmax); Related QuestionHow to import .mat file in excelHow to print an array values and save the values in .mat file.Put bars in bar graph in ascending orderInverse of sorting arrangementMAT filesFind groups of duplicate values and preserving order
Best Answer