Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x1=1; x2=-1;
- y1=-1; y2=0;
- y=((x-1)*(y2-y1)+y1*(x2-x1))/(x2-x1);
- subplot(1,2,1)
- plot(x,y,'LineWidth',2)
- hold on
- text(1,2,'m1');
- text(-1,0,'m2');
- line([-5 5],[0 0],'color','black');
- line([0 0],[-5 5],'color','black');
- text(-0.5,-0.5,'O')
- quiver(0,0,1,0,'k');
- quiver(0,0,0,1,'k');
- quiver(0,0,(x2-x1),(y2-y1),'LineWidth',3)
- quiver(1,4,(x2-x1),(y2-y1),'LineWidth',3)
- quiver(0,0,-(y2-y1),(x2-x1),'LineWidth',3)
- quiver(1,4,-(y2-y1),(x2-x1),'LineWidth',3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement