Coding practice question, printed out a question sheet and not sure how this would be done.

1 回表示 (過去 30 日間)
Matthew Chesky
Matthew Chesky 2021 年 4 月 27 日
回答済み: David Fletcher 2021 年 4 月 27 日
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?

回答 (1 件)

David Fletcher
David Fletcher 2021 年 4 月 27 日
X(3:3:150)=[]

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by