How do I randomise the order of cells in an array?

조회 수: 4 (최근 30일)
Cai Chin
Cai Chin 2021년 2월 5일
답변: Anmol Dhiman 2021년 2월 7일
Hi, I am attempting to randomise the order of elements in cell arrays. One is a numerical cell array comprised of 1x300 doubles (Signals_v_concetanted) and the other is a categorical cell array with the letters 'A' and 'N' (Labels_training). Is it possible to randomise the order of components in both arrays but set a seed to make sure that the randomisation is constant across both cell arrays?

답변 (1개)

Anmol Dhiman
Anmol Dhiman 2021년 2월 7일
Hi Cai,
You can use randperm. Follow a similar answer.
Hope it helps

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by