-8

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;
Dan
  • 45,079
  • 17
  • 88
  • 157
user3115590
  • 19
  • 1
  • 4

1 Answers1

1

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

mathematician1975
  • 21,161
  • 6
  • 59
  • 101