Create the vector lin:

(the integers from 1 to 20)
Make every other value in it negative to get:
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers430
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15783 Solvers
-
Returning a "greater than" vector
276 Solvers
-
Is this triangle right-angled?
6411 Solvers
-
373 Solvers
-
422 Solvers
More from this Author26
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
There is something a little unsatisfying about solving a 'Problem' in which there is no input, and (thus) only one output case required, and where furthermore a valid solution is shown in the Test Suite. This seems to apply to all/most 'Problems' tagged "sttbdp1".