shuffle label

randomly relabel a label matrix
875.0 次下载
更新时间 2009/9/16

查看许可证

shufflelabel randomly changes the order of label values in a label matrix. Zeros and nans are ignored. The label matrix can be every numerical data type, char or a cell array of strings.


Example

L = kron([1 2 3;3 2 3],[1 1; 2 2])


L =

1 1 2 2 3 3
2 2 4 4 6 6
3 3 2 2 3 3
6 6 4 4 6 6

Ls = shufflelabel(L)

Ls =

3 3 6 6 1 1
6 6 2 2 4 4
1 1 6 6 1 1
4 4 2 2 4 4

引用格式

Wolfgang Schwanghart (2024). shuffle label (https://www.mathworks.com/matlabcentral/fileexchange/25310-shuffle-label), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2009a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1.0.0

fixed helpblock, added a reset option

1.0.0.0