Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Curious
Posts:
2,358
Registered:
12/6/04


Re: Matrix Dimensions must agree.
Posted:
Feb 12, 2013 11:33 AM


"Erik" wrote in message <kfdpbk$kdp$1@newscl01ah.mathworks.com>... > I have this: > t= [0:100]; > L = 100; > k = [.1 .3 .7]; > C = 25; > > i want to multiply > k .* t > > but i get an error message saying matrix dimensions must agree. > I thought the . before the * would get rid of that error but it doesn't. what is going on???
Well, k has 3 elements and t has 101.
How do you expect the results to look like by multiplying 3 things by 101 things?
Do you want an array of 3X101 or 101X3 perhaps?
Maybe something like:
k*t'



