?? sortbycol.m
字號:
function [y]= sortbycol(x,a)
% SORTBYCOL
% This function sorts a matrix into accending order where only one
% column becomes sorted and the other entries just swap values in order
% to maintain their relationship with the value in the sorted column.
%
% Habtom Ressom
% February 22, 2005
%
% Y = SORTBYCOL(X,COLUMN)
%
% Inputs are: X (matrix) and COLUMN
% Output: Y - sorted matrix
[b i] = sort(x(:,a),'ascend');
y = x(i,:);
end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -