Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Could anyone help me to solve the following issue.

1 vue (au cours des 30 derniers jours)
jaah navi
jaah navi le 3 Juin 2019
Clôturé : Stephen23 le 3 Juin 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 commentaires
jaah navi
jaah navi le 3 Juin 2019
So far no desired result.Thats why i repeated the same question.
KSSV
KSSV le 3 Juin 2019
YOu keep on asking the same simple questions.

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by