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

 Réponse acceptée

Star Strider
Star Strider le 26 Avr 2021
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.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Produits

Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by