📄 cellsort.m
字号:
function [result, index] = cellsort(x)% tstool/cellsort% sort an cell-array x of strings% result is an cell array containing the strings in ascending order% index contains the permutation orderif nargin < 1, help(mfilename), return, end if iscellstr(x) temp = char(x); % convert cell-array to fixed-length array, each string in a row [temp, index] = sortrows(temp); result = cellstr(temp); % convert array back to cell-arrayelse error('Argument is not a cell array of strings');end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -