Matrix Multiplication
显示 更早的评论
Basically I have a problem with multiplying my matrices and have No idea howto solve it 1st. Matrix x(t) = sin( 2*pi*t/3) for t = -20:0.01:20 2nd. Matrix N=4000 w=hamming(N)
How do I multiply these two togehter (element by element didnt work when I transposed X and then .*'d it with w)
回答(2 个)
Fangjun Jiang
2011-9-16
0 个投票
use size() function to get the size of your matrix. You'll find out the size of your two matrices are slightly different.
Eric
2011-9-16
0 个投票
2 个评论
Fangjun Jiang
2011-9-16
You need to understand the difference between matrix multiplication and element multiplication. A=rand(3,1);B=rand(3,1);C=A.*B;D=A*B';
Fangjun Jiang
2011-9-16
In your code, x should be 1 by 4000.
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!