Raja Sattiraju
Raja Sattiraju

Reputation: 1272

significance of ~ symbol in matlab function

If I have a function a that accepts 2 parameters (double) in Matlab as follows

function [x,y] = a(z)

What does the symbol "~" do when the function is called with this handle as follows

[x,~,y] = a[10]

Thanks

Upvotes: 0

Views: 85

Answers (1)

willpower2727
willpower2727

Reputation: 789

The "~" symbol in matlab is logical NOT. So it's basically like ignoring that output/input. For example, if I have a line of code like this:

[out1,~,out3] = function(vargin);

the second output is not kept or stored anywhere for later use. For more info, type "help ~" in the command window.

Upvotes: 1

Related Questions