Help me draw the same graph, I understand that to draw it you need to write ezplot ('(2 * x. ^ 3 + exp (-x. ^ 2))', [-2 2]), but I do not understand how to edit its to make it look like the one in the picture

 採用された回答

Star Strider
Star Strider 2021 年 4 月 26 日

0 投票

This will get you started —
figure
h = ezplot ('(2*x.^3 + exp (-x.^2))', [-2 2]);
h.Color = 'm';
hold on
xsquares = h.XData(1:20:end);
ysquares = h.YData(1:20:end);
plot(xsquares,ysquares,'sb')
hold off
pos = get(gca,'Position');
xa = pos(1)+pos(3)*[0.7 0.5];
ya = pos(2)+pos(4)*[0.3 0.47];
annotation('textarrow',xa,ya,'String','extrém', 'Color','g')
text(0,16,'Graf funcie = y = f(x)', 'Horiz','center', 'Color','m')
Make appropriate changes to get the result you want.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

製品

リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by