What's wrong in the code? I cant generate the same graph as the question required.
1 回表示 (過去 30 日間)
古いコメントを表示

function y = f(x)
x = -5:5;
y = sin(x.^2).*exp(cos(x));
plot(x,y)
end
採用された回答
その他の回答 (1 件)
Yusuf Suer Erdem
2021 年 11 月 17 日
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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!