Borrar filtros
Borrar filtros

randomise array with non-integer values

3 visualizaciones (últimos 30 días)
darksideofthemoon101
darksideofthemoon101 el 5 de Abr. de 2011
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

Respuesta aceptada

darksideofthemoon101
darksideofthemoon101 el 5 de Abr. de 2011
Never mind, I solved the problem this way:
X=0.05:0.0025:0.15;
randomiser = randperm(length(layer));
X=X(randomiser);

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by