How to manipulate this matrix?

1 visualización (últimos 30 días)
Shubham Mohan Tatpalliwar
Shubham Mohan Tatpalliwar el 1 de Nov. de 2018
Comentada: madhan ravi el 1 de Nov. de 2018
if true
% code
A= [0,0,0;0,2,3;1,2,3]
ExpectedA=[3,2,1;3,2,0;0,0,0]

Respuesta aceptada

madhan ravi
madhan ravi el 1 de Nov. de 2018
Editada: madhan ravi el 1 de Nov. de 2018
A= [0,0,0;0,2,3;1,2,3]
Expected_A=[3,2,1;3,2,0;0,0,0]
result=fliplr(flip(A,1)) %here is the manipulation
logical(Expected_A==result) %to check expected result is the same as the manipulated
command window:
>> COMMUNITY
A =
0 0 0
0 2 3
1 2 3
Expected_A =
3 2 1
3 2 0
0 0 0
result =
3 2 1
3 2 0
0 0 0
ans =
3×3 logical array
1 1 1
1 1 1
1 1 1
>>
  4 comentarios
Shubham Mohan Tatpalliwar
Shubham Mohan Tatpalliwar el 1 de Nov. de 2018
Actually these are the values which i want to flip but the Nan should not move from its place
madhan ravi
madhan ravi el 1 de Nov. de 2018
get back to your old question

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by