フィルターのクリア

create a vector which counts down from 200 to 0 by two. How to make every other being negative

30 ビュー (過去 30 日間)
create a vector which counts down from 200 to 0 by two with every other entry being negative I already can create a vector from 200 to 0 by 2: X= [200:-2:0] How to make every other entry being negative

採用された回答

KSSV
KSSV 2017 年 9 月 1 日
X= [200:-2:0] ;
X(1:2:end) = -X(1:2:end) ;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNaNs についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by