我正在尝试对 matlab ui 表列(使用 jide 创建)进行排序。但不是按数字排序,而是基于字符串排序。例如,如果我有 4,44,2,22,1,11,它会被排序为 1,11,2,22,4,44 而不是 1,2,4,11,22,44
Scroll=lib.findjobj(m.thandle);
m.hjtable = Scroll.getViewport.getView;
m.hjtable.setNonContiguousCellSelection(false);
m.hjtable.setColumnSelectionAllowed(false);
m.hjtable.setRowSelectionAllowed(true);
% Make table sortable on columns
m.hjtable.setSortable(true);
m.hjtable.setAutoResort(true);
m.hjtable.setMultiColumnSortable(true);
m.hjtable.setPreserveSelectionsAfterSorting(true);