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 Exchange에서 MATLAB에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

2021년 4월 26일

답변:

2021년 4월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by