how to multiply certain numbers in a matrice
1 次查看(过去 30 天)
显示 更早的评论
if have a matrice A=[1,5,4;3,1,5;6,3,1] But I want to multiply only certain numbers for example A=[2,5,4;3,2,5;6,3,2] how do i do this.
0 个评论
回答(2 个)
Guillaume
2017-2-8
You haven't explain what certain numbers mean. At a guess:
A(A == 1) = A(A == 1) * 2;
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!