Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Could anyone help me to solve the following issue.

1 visualización (últimos 30 días)
jaah navi
jaah navi el 3 de Jun. de 2019
Cerrada: Stephen23 el 3 de Jun. de 2019
I am trying from today morning but unable to get the desired result.
I am having matrix
a =[ 4.7908 5.0104 5.1329 5.3186 5.3094 5.3070 5.4452 5.5001;
0.0958 0.0994 0 0 0.1848 0.2020 0.1851 0.2146;
0.0848 0 0.1469 0.1859 0.1767 0.1854 0.1856 0.1648;
0 0 0 0 0 0 0 0;
0 0.0896 0.1619 0.1351 0 0 0 0;
0 0 0 0 0 0 0 0]
With respect to this matrix i want to change the place of elements randomly present in each column of matrix.
For example,the first column can be arranged as [4.7908;
0;
0.0848;
0;
0.0958;
0] % the place of elements got changed with respect to first column itself.
Inorder to perform this i tried with the following code
for i=1:size(a,2)
iwant = reshape(a(randperm(numel(a))),size(a))
end
Now when coming to the second column,the elements needs to be changed with respect to the second column itself without affecting the first column.
But in my code when the loop comes for the secong column it affects the first column also.
Could anyone please help me on this
  3 comentarios
jaah navi
jaah navi el 3 de Jun. de 2019
So far no desired result.Thats why i repeated the same question.
KSSV
KSSV el 3 de Jun. de 2019
YOu keep on asking the same simple questions.

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by