what does A(~A) mean?

17 vues (au cours des 30 derniers jours)
Hussein Dadashi
Hussein Dadashi le 9 Nov 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,

Réponse acceptée

Walter Roberson
Walter Roberson le 9 Nov 2016
It works out the same as
A(A~=0) =inf
Which is to say that it replaces all nonzero entries with infinity.
  1 commentaire
Hussein Dadashi
Hussein Dadashi le 9 Nov 2016
Thank you so much

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by