how do you write the equation f=exp(x)*cos(x)?

7 views (last 30 days)
how do you write the equation f=exp(x)*cos(x)? it is saying that the inner matrix dimensions must agree

Accepted Answer

James Tursa
James Tursa on 13 Nov 2017
I am guessing you want to use the element-wise multiply operator, which has the dot:
f = exp(x) .* cos(x);

More Answers (0)

Categories

Find more on Numerical Integration and Differential Equations in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!