필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Could anyone help me to solve the following issue.

조회 수: 1 (최근 30일)
jaah navi
jaah navi 2019년 6월 3일
마감: Stephen23 2019년 6월 3일
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
jaah navi
jaah navi 2019년 6월 3일
So far no desired result.Thats why i repeated the same question.
KSSV
KSSV 2019년 6월 3일
YOu keep on asking the same simple questions.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by