what does A(~A) mean?

16 visualizaciones (últimos 30 días)
Hussein Dadashi
Hussein Dadashi el 9 de Nov. de 2016
Comentada: Hussein Dadashi el 9 de Nov. de 2016
Hi
could someone tell me what does following code mean please?
A(~A)=inf; %A is a vector with zero and non-zero numbers.
Best,

Respuesta aceptada

Walter Roberson
Walter Roberson el 9 de Nov. de 2016
It works out the same as
A(A~=0) =inf
Which is to say that it replaces all nonzero entries with infinity.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by