please explain the solution.
The ~ is a dummy variable, and isn't needed for the calculation. Some earlier versions of MATLAB don't have that option, and will give you an error with that statement. If you have that happen, you can use dummy or junk as the variable name in place of the ~.
thanks James
I'm late, but James answer ist perfect! ;-)
6063 Solvers
Project Euler: Problem 2, Sum of even Fibonacci
835 Solvers
Create a vector whose elements depend on the previous element
391 Solvers
Find out missing number from a vector of 9 elements
245 Solvers
Find the index of n in magic(n)
160 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!