필터 지우기
필터 지우기

Shuffling a cell array

조회 수: 27 (최근 30일)
Bruno
Bruno 2014년 2월 26일
답변: Jos (10584) 2014년 2월 26일
Y is a cell array where every cell has the T and x subsections. I extracted the cell that I needed and plotted out=cell2mat(Y([6 8 10 12 17 19 29 33 36 44]));
T=out(1:3640,2);
plot(T);
I want to shuffle the cell that I extracted and plot
Thanks

답변 (1개)

Jos (10584)
Jos (10584) 2014년 2월 26일
If you intend to randomise the order of the elements of an array A, try this
A = [10 20 30 40 50 60]
A_shuffled = A(randperm(numel(A)))
help randperm

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by