Domanda

What does the tilde symbol ~ do in Matlab?

for example, I've got the Matlab line, in which a and b are tables.

a =~b;
È stato utile?

Soluzione

Basically a is assigned to the result of the logical not operator applied to b

For example if b is the matrix

b = [12 0 10]

then

a = ~b 
a = [0 1 0]

See http://www.mathworks.co.uk/help/matlab/ref/not.html for details

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top