如何在MatLab中画带箭头的坐标系?
%%clear;
close all;
%%
u = 1;
v = 2;
x=-3:3;
y=u * x + v;
figure; plot(x,y,'LineWidth',1.5);
hold on;
%Draw axes
plot(,,'k',,,'k');
% Draw arrows
ax=;
fill(ax(1,:),ax(2,:),'k');
ay=;
fill(ay(1,:),ay(2,:),'k');
%%
text(0.2, 5.6, 'y', 'FontName','Times New Roman','FontAngle','Italic','FontSize',18, 'HorizontalAlignment','left')
text(3.6, -0.1, 'x','FontName','Times New Roman','FontAngle','Italic','FontSize',18, 'VerticalAlignment','top')
axis off
print('-djpeg', 'Oxy.jpg')
转自:http://blog.sina.com.cn/s/blog_82b526270101e3fb.html
页:
[1]