Multiply a column by a number
74 次查看(过去 30 天)
显示 更早的评论
How Could I simply multiply each element of this array by 4? A=array(:,6);
0 个评论
采纳的回答
更多回答(1 个)
Roger Stafford
2018-3-30
Let Ar be the name of the array.
Ar(:,6) = 4*Ar(:,6);
What could be simpler? Since 4 is a scalar, it is automatically applied to each element of that column.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!