asort: a pedestrian alphanumeric string sorter

版本 1.0.0.0 (11.2 KB) 作者: us
numerically sorts an array or cell array of strings.
4.9K 次下载
更新时间 2006/12/13

查看许可证

ASORT sorts an array or cell array of alphanumeric strings numerically rather than in ascii dictionary order

strings are divided into three different categories, which are returned in separate cells

- numerically sorted strings that contain only one readable number
- ascii dictionary order sorted strings that contain more than one readable or invalid numbers
- ascii dictionary order sorted strings that contain no numbers

see
> help asort
for explanations and options

this sorter can be used, for instance, to sort files with numerical extensions, eg,

f.1
f.2
f.3
f.10
f.21

look at the accompanying published m-file for a few examples

引用格式

us (2024). asort: a pedestrian alphanumeric string sorter (https://www.mathworks.com/matlabcentral/fileexchange/7212-asort-a-pedestrian-alphanumeric-string-sorter), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R14SP1
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Shifting and Sorting Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

html/

版本 已发布 发行说明
1.0.0.0

a previous revision 12/12/05 apparently never made it online (thanks to tom muylle for stumbling onto this omission!); the resubmission has the ver tag 13-Dec-2006 18:29:17