Multiplications of functions in Matlab

1 reply · 4K views · last reply
mech-eng
Messages
826
Reaction score
13
Hi. When I try to this multiplication: t=[0:0.02:1]; f=exp(-t)*sin(t)
Error using *
Inner matrix dimensions must agree.

in Matlab I take the error above and I can not also plot its graph by plot(x,y). Can somebody help me?
 
You need to use .* to perform element-wise multiplication on each element of these vectors.