Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
Irmak Aksoy
Irmak Aksoy le 28 Oct 2020
Clôturé : MATLAB Answer Bot le 20 Août 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);

Réponses (1)

David Hill
David Hill le 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!

Translated by