I was looking at on Matlab code , I could not understand the use of tilde ~ before if condition .
if ~isfield(ArgDS,'mu')

 Respuesta aceptada

Star Strider
Star Strider el 12 de Nov. de 2016

5 votos

The tilde ‘~’ is a logical negation. So the if condition will be true when 'mu' is not a field of the ‘ArgDS’ structure.

2 comentarios

boureghda mohammed
boureghda mohammed el 14 de Nov. de 2016
Thanks for the clarification "Star Strider"
Star Strider
Star Strider el 14 de Nov. de 2016
My pleasure.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Preguntada:

el 12 de Nov. de 2016

Comentada:

el 14 de Nov. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by