Put array data inside another array without a for cycle

1 回表示 (過去 30 日間)
Dario
Dario 2017 年 12 月 18 日
回答済み: Guillaume 2017 年 12 月 18 日
I have 2 array of equal dimension: 1440000x1. I need to put in the 2nd array the value 0 when there is the value 0 in the first array (in the same position). There is a quick way to do this not using a for cycle?

採用された回答

Guillaume
Guillaume 2017 年 12 月 18 日
Very simply:
array2(array1 == 0) = 0

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by