Didn't find a relevant answer.
Suppose we have an array
R=[1 2 1 2 2 2]';
How to replace "2" with "4" ?
Thank you.

 採用された回答

michio
michio 2016 年 9 月 26 日
編集済み: michio 2016 年 9 月 26 日

2 投票

R=[1 2 1 2 2 2]';
R(R==2) = 4;

その他の回答 (0 件)

製品

質問済み:

2016 年 9 月 26 日

編集済み:

2016 年 9 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by