📄 unsort_d.m
字号:
% PURPOSE: demo of unsort() % returns sorted vectors or matrices% in unsorted (orginal) form % %---------------------------------------------------% USAGE: unsort_d%---------------------------------------------------n = 10; k = 4;tt = randn(n,1); % generate a vector of random numbers[tts tti] = sort(tt); % sort themttu = unsort(tts,tti); % unsort themfprintf(1,'These two vectors should be the same \n');[tt ttu]tt = randn(n,k); % generate a matrix[junk tti] = sort(tt(:,1)); % sort by first columntts = tt(tti,:);ttu = unsort(tts,tti); % unsort themfprintf(1,'These two matrices should be the same \n');in.fmt = strvcat('%8.2f');mprint(tt,in);mprint(tt,in);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -