How to do a Quiver plot between two data sets?

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

Rafael Freire
Rafael Freire il 1 Nov 2012
Modificato: Rafael Freire il 1 Nov 2012
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)

Più risposte (0)

Categorie

Scopri di più su Vector Fields in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by