Hi I have a simple daught on matlab and I was hoping you could help me!
Imagine i generate a random vector:
a=randi(5,1,7)
and it generates: 1 3 4 2 5 1 2
My daught is: how do i replace the 1's by 10's?

 採用された回答

madhan ravi
madhan ravi 2018 年 11 月 9 日
編集済み: madhan ravi 2018 年 11 月 9 日

1 投票

a=randi(5,1,7)
a(a==1)=10

1 件のコメント

madhan ravi
madhan ravi 2018 年 11 月 9 日
編集済み: madhan ravi 2018 年 11 月 11 日
If this is what you want make sure to accept the answer so that people know the question is solved else let know

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

質問済み:

2018 年 11 月 9 日

編集済み:

2018 年 11 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by