Borrar filtros
Borrar filtros

how can i remove an element from a matrix

1 visualización (últimos 30 días)
Imane hammou ouali
Imane hammou ouali el 14 de Abr. de 2019
Comentada: Walter Roberson el 14 de Abr. de 2019
hello community,
i have a matrix A=[0 0 0;0.7 1 0.7] i want to remove the element 1 A(2,2) help please

Respuestas (1)

Ronny Landsverk
Ronny Landsverk el 14 de Abr. de 2019
If you want a representation of an empty element, use NaN (not a number).
A(2,2) = NaN;
  1 comentario
Walter Roberson
Walter Roberson el 14 de Abr. de 2019
And if replacing the location with some set value such as NaN or -9999 is not appropriate, then you have the problem that rectangular arrays cannot have "holes" in them.

Iniciar sesión para comentar.

Categorías

Más información sobre Logical 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