How to do a Quiver plot between two data sets?

1 次查看(过去 30 天)
How i make a quiver plot between each dot in the same line dot P1(1,:) with P2(1,:); P1(2,:) with P2(2,:) and on....
P1=[121.578100000000 6.97130000000000
115.047800000000 6.22980000000000
144.975100000000 7.44900000000000
116.170800000000 6.75630000000000
115.146500000000 6.68150000000000]
P2=[121.567800000000 6.98020000000000
115.059500000000 6.23620000000000
144.959200000000 7.44990000000000
116.141900000000 6.74180000000000
115.056800000000 6.67760000000000]
Best Regards

采纳的回答

Rafael Freire
Rafael Freire 2012-11-1
编辑:Rafael Freire 2012-11-1
D=P2-P1
figure
for k=1:length(P1);
hold on;
quiver(P1(k,2), P1(k,1), D(k,2),D(k,1),0);
end
plot(P1(:,2), P1(:,1), '.b', 'markersize', 15)
plot(P2(:,2), P2(:,1), '.g', 'markersize', 20)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Vector Fields 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by