To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
how can sort values except zero values i.e i want to sort just non zero values in c. how do that. c=[8 4 5 1 0 0 0 ];
No products are associated with this question.
Do you want to keep all zeros at the original location? If so
c = [8 4 5 1 0 0 0]; c(c~=0) = sort(c(c~=0));