With MATLAB Version 7.9 (R2009b) you can use a ~, e.g.,

```
[~, ~, variableThatIWillUse] = myFunction();
```

Note that the `,`

isn’t optional. Just typing `[~ ~ var]`

will not work, and will throw an error.

See the release notes for details.

### Related Contents:

- How can I index a MATLAB array returned by a function without first assigning it to a local variable?
- Is it possible to define more than one function per file in MATLAB, and access them from outside that file?
- How can I apply a function to every row/column of a matrix in MATLAB?
- Function for ‘does matrix contain value X?’
- MATLAB – multiple return values from a function?
- Difference between return and exit in Bash functions
- How to return a result from a VBA function
- xkcd style graphs in MATLAB
- How to return 2 values from a Java method?
- Should functions return null or an empty object?
- How can I return two values from a function in Python?
- Is there a foreach in MATLAB? If so, how does it behave if the underlying data changes?
- Is MATLAB OOP slow or am I doing something wrong?
- Using i and j as variables in MATLAB
- What can MATLAB do that R cannot do? [closed]
- How do I set default values for functions parameters in MATLAB?
- Matlab: Running an m-file from command-line
- What’s the difference between & and && in MATLAB?
- Map function in MATLAB?
- Octave / Matlab: Extend a vector making it repeat itself?
- Which is more efficient: Return a value vs. Pass by reference?
- Hash tables in MATLAB
- Setting graph figure size
- cocktail party algorithm SVD implementation … in one line of code?
- Is it pythonic for a function to return multiple values?
- In MATLAB, can I have a script and a function definition in the same file?
- Changing Fonts Size in Matlab Plots
- Octave/Matlab: Adding new elements to a vector
- How to change the window title of a MATLAB plotting figure?
- What is your favourite MATLAB/Octave programming trick? [closed]
- Optional args in MATLAB functions
- How to deal with name/value pairs of function arguments in MATLAB
- Why is 24.0000 not equal to 24.0000 in MATLAB?
- How do I get the handles of all open figures in MATLAB
- How to use SIFT algorithm to compute how similar two images are?
- Accelerating MATLAB code using GPUs?
- Is it ok to skip “return None”?
- How do I detect if I’m running MATLAB or Octave?
- How to visualize a project structure in MATLAB? [closed]
- Fitting largest circle in free area in image with distributed particle
- How to create a new figure in MATLAB?
- How to initialize an array of structs in MATLAB?
- MATLAB – How to zoom subplots together?
- Inhibit Matlab Window Focus Stealing
- How to normalize a signal to zero mean and unit variance?
- ternary operator in matlab
- Understanding Matlab FFT example
- How to generate all pairs from two vectors in MATLAB using vectorised code?
- Find location of current m-file in MATLAB
- How to normalize a vector in MATLAB efficiently? Any related built-in function? [closed]