How to multiply elements of a matrix by a number
7 次查看(过去 30 天)
显示 更早的评论
Hi, I'm having a matrix of size X= [280,307,191] and i want to restore the matrix such that the 3rd dimension of the matrix is multiplied by '12'
Thank you
回答(2 个)
Image Analyst
2013-4-8
You misunderstood the discussion in your prior question. Anyway, to do what you're asking for here (which is not what you really want):
A = 12 * A;
Why? Because, of course, every voxel has a Z value. I bet you're confused now, so better go back to your prior question and figure out what you really want to do.
0 个评论
rimsha fazal
2022-7-3
Hi I have a case to multiply 2 by 2 matrix with a variable of 50000 elements. how can i do this?
w.*[Cm] it doesn't work.
1 个评论
Image Analyst
2022-7-3
If you want a matrix multiplication do
theProduct = w * Cm
% or
theProduct = Cm * w
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!