Hey guys, i need help with vector maniuplation

1 回表示 (過去 30 日間)
Shameendra Narayan Halder
Shameendra Narayan Halder 2018 年 6 月 24 日
コメント済み: Paolo 2018 年 6 月 24 日
Hey guys, can someone help me with this?
Create vector “v” (begin at -3 and end at 3, step size 1). Create a vector "w" which includes all elements from "v" but multiply all values which are smaller/equal "0" (<0) by 2.

採用された回答

Paolo
Paolo 2018 年 6 月 24 日
v = -3:1:3
w = v
w(w<0) = w(w<0)*2
  2 件のコメント
Shameendra Narayan Halder
Shameendra Narayan Halder 2018 年 6 月 24 日
Thanks a lot! Works perfect
Paolo
Paolo 2018 年 6 月 24 日
You are welcome, don't forget to mark the answer as accepted.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by