How would you plot y=x^(2)e^(-x2)?
17 ビュー (過去 30 日間)
古いコメントを表示
0 件のコメント
採用された回答
Star Strider
2017 年 7 月 8 日
Try this:
x = linspace(-5, 5);
y = x.^2 .* exp(-(x.^2));
figure(1)
plot(x, y)
grid
Experiment to get the result you want. See the documentation on the various functions for details on what they can do and how to use them.
Also, you must use element-wise operations here. See the documentation on Array vs. Matrix Operations (link) for details.
0 件のコメント
その他の回答 (1 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!