Info

This question is closed. Reopen it to edit or answer.

WHY THE CODE GIVE ERROR AT THE d=a*(b+c);

1 view (last 30 days)
Irmak Aksoy
Irmak Aksoy on 28 Oct 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
clc
x=0:1:20;
a=exp(-1.3*x);
b=-1.56*10^-5*sin(13*x);
c=3.4*10^-6.*cos(13*x);
d=a*(b+c);
plot(x,d);

Answers (1)

David Hill
David Hill on 28 Oct 2020
x=0:1:20;
a=exp(-1.3*x);
b=-1.56*10^-5*sin(13*x);
c=3.4*10^-6*cos(13*x);
d=a.*(b+c);%need a dot (.*)
plot(x,d);

Tags

Community Treasure Hunt

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

Start Hunting!