simple doubt about vector
1 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
madhan ravi
2018-11-9
编辑:madhan ravi
2018-11-9
a=randi(5,1,7)
a(a==1)=10
1 个评论
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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!