如何在Matlab绘制的图像坐标轴上加箭头?x=[22.471 22.438 22.394 22.362 22.262 22.008 20.931 19.52 18.03 13.824 10.567 9.232 7.494 6.433 5.808 5.293 4.891 4.519 4.204 3.908 3.648 3.404 3.146 2.929 2.499 2.159];y=[0 10 20 30 50 75 100 125 1
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/09 02:21:35
如何在Matlab绘制的图像坐标轴上加箭头?x=[22.471 22.438 22.394 22.362 22.262 22.008 20.931 19.52 18.03 13.824 10.567 9.232 7.494 6.433 5.808 5.293 4.891 4.519 4.204 3.908 3.648 3.404 3.146 2.929 2.499 2.159];y=[0 10 20 30 50 75 100 125 1
如何在Matlab绘制的图像坐标轴上加箭头?
x=[22.471 22.438 22.394 22.362 22.262 22.008 20.931 19.52 18.03 13.824 10.567 9.232 7.494 6.433 5.808 5.293 4.891 4.519 4.204 3.908 3.648 3.404 3.146 2.929 2.499 2.159];
y=[0 10 20 30 50 75 100 125 150 200 250 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1750 2000];
plot(x,y,'r.')
p=polyfit(x,y,3);
y1=p(1)*x.^3+p(2)*x.^2+p(3)*x+p(4);
plot(x,y,'r.')
hold on
plot(x,y1,'-','LineWidth',2)
set(gca,'Ydir','reverse')
axis([0 25 0 2000])
set(gca,'XAxisLocation','top')
hold off
这是我修改后的完善的程序,但是要如何在X,Y轴上加箭头呢?
如何在Matlab绘制的图像坐标轴上加箭头?x=[22.471 22.438 22.394 22.362 22.262 22.008 20.931 19.52 18.03 13.824 10.567 9.232 7.494 6.433 5.808 5.293 4.891 4.519 4.204 3.908 3.648 3.404 3.146 2.929 2.499 2.159];y=[0 10 20 30 50 75 100 125 1
请问楼主是要这种效果么?