Question: use while loop in matlab Using a while loop, write a function nextinteger(v) which takes as input a vector v and as output returns, c,
Using a while loop, write a function nextinteger(v) which takes as input a vector v and as output returns, c, the next smallest positive integer which does not appear in v. For example, if the input is [1, 2, 3]), the output would be 4. If the input is [4, 0, 1, -10], the output would be 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
