...
c)
Code Block |
---|
function mat = untitledFunction7sortLists(mat) [l,~] = size(mat); for i =1: l mat(i,:) = insertionSort(mat(i,:)); end end |
d)
Code Block |
---|
function mat = sortMatrix(mat)
mat = mat';
[x,y] = size(mat);
list = reshape(mat,[1,x*y]);
list = insertionSort(list);
mat = reshape(list,[x,y]);
mat = mat';
end |