Coding practice question, printed out a question sheet and not sure how this would be done.
Show older comments
Assume that you have a vector, X, with 150 elements. Write the single line MatLab command that will delete every third element; that is it deletes elements 3, 6, 9 and so on.
How would this be coded and look like?
Answers (1)
David Fletcher
on 27 Apr 2021
X(3:3:150)=[]
Categories
Find more on Whos 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!