plot就能绘制,然后在figure中插入箭头、注释及line虚线。
X = 1:10;
Y = X.^2;
fig = figure(); hold on;
plot(X, Y.*1, ...
"Color", "blue");
plot(X, Y.*2, ...
"Color", "red");
plot(X, Y.*3, ...
"Color", "green");
text(4, 16, "(4, 16)");
legend("y=1*x^2", "y=2*x^2", "y=3*x^2", ...
"Location", "northwest");
xlim([-1, 11]); ylim([-10, 310]);
xlabel("XLabel"); ylabel("YLabel");
grid on; hold off;
正好matlab开着帮你写一段作为参考吧,效果如下。
您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~
如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~
ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632