randomise array with non-integer values

조회 수: 3 (최근 30일)
darksideofthemoon101
darksideofthemoon101 2011년 4월 5일
Hi,
I want to randomise the elements in a 1-D array. I can't use randperm as the elements are non-integer values. Any ideas?
Thanks,
Richard

채택된 답변

darksideofthemoon101
darksideofthemoon101 2011년 4월 5일
Never mind, I solved the problem this way:
X=0.05:0.0025:0.15;
randomiser = randperm(length(layer));
X=X(randomiser);

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by