Coud anyone help me to solve the issue.
Mostrar comentarios más antiguos
I am having a matrix
A=[3.5204 3.7294 3.9112 4.0754 4.2294 4.3787;
0 0 0 0 0 0;
0 0 0 0 0 0;
0 0 0 0 0 0;
0.4337 0.4255 0.4162 0.4065 0.3967 0.3871]
i want to rearrange the matrix in such a way that the sum of (A,1) and sum of (A,2) should not be equal to zero.
Also the number of non zero values present in each row or column can be more than one.
3 comentarios
madhan ravi
el 2 de Ag. de 2019
Show how your desired matrix should look like.
jaah navi
el 2 de Ag. de 2019
madhan ravi
el 2 de Ag. de 2019
madhan ravi:
A(~sum(A,2),:)=[];
A(:,~sum(A,1))=[]
jaah navi:
I want to have the output in the following manner
A=[3.5204 0 3.9112 0 0 0;
0 0 0 4.0754 0 0.3871;
0 3.7294 0 0 0.3967 0;
0.4337 0 0.4162 0 4.2294 4.3787;
0 0.4255 0 0.4065 0 0]
madhan ravi:
Mind explaining in which logic they are rearranged??
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!