cah2oeng
Civil/Environmental
- Feb 29, 2004
- 32
I'd like to multiply a 1-D vector by a 2-D array without using a loop. Here's what I currently have:
A = ones(10,10);
z = 1:10;
for i = 1:length(z)
result
,:,i) = z(i)*A;
end
Is there any way to do some sort of dot product between z and A that achieves the same result?
Thanks
A = ones(10,10);
z = 1:10;
for i = 1:length(z)
result
end
Is there any way to do some sort of dot product between z and A that achieves the same result?
Thanks