What's wrong in the code? I cant generate the same graph as the question required.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Kai Wing YU
le 17 Nov 2021
Réponse apportée : Yusuf Suer Erdem
le 17 Nov 2021
function y = f(x)
x = -5:5;
y = sin(x.^2).*exp(cos(x));
plot(x,y)
end
Réponse acceptée
Plus de réponses (1)
Yusuf Suer Erdem
le 17 Nov 2021
x = linspace(-5,5);
k = sin(x.^2);
l= exp(cos(x));
y = k.*l;
plot(x,y)
USE THIS WAY, IT HELPS. I THINK YOU WERE JUST MISSING 'LINSPACE' COMMAND. GOOD LUCK!
0 commentaires
Voir également
Catégories
En savoir plus sur Directed Graphs dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!