Make the vector lin=[1 2 3 ⋯ 20] (the integers from 1 to 20), and then make every other value in it negative to get lin=[1 −2 3 −4 ⋯ −20] . what is the MATLAB code?
Show older comments
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 11 Jul 2015
Edited: Azzi Abdelmalek
on 11 Jul 2015
a=-(1:20)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!