Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Multiplications of functions in Matlab

  1. Jun 24, 2014 #1
    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?
  2. jcsd
  3. Jun 24, 2014 #2


    User Avatar
    Science Advisor
    Gold Member

    You need to use .* to perform element-wise multiplication on each element of these vectors.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Multiplications of functions in Matlab