How to find /plot a parallel cordinate at a fixed distace from a lat long cordinate point in matlab
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Rakshit R
el 1 de Abr. de 2019
Comentada: Rakshit R
el 6 de Abr. de 2019
I have two points in a map and have plotted these points by fitting a line in between them. lat10 = [11.0304,12.1497]; lon10 = [77.0391,77.2914 ]
I'm trying to plot a line which is paralel to this line/ points at a distance of 20 nmi. Kindly help please.
0 comentarios
Respuesta aceptada
KSSV
el 1 de Abr. de 2019
x = rand(2,1) ;
y = rand(2,1) ;
% fit a line
p = polyfit(x,y,1) ;
xi = linspace(x(1),x(2)) ;
yi = polyval(p,xi) ;
%
plot(x,y,'.r')
hold on
plot(xi,yi,'b')
%% Draw line at distance d
d = 5. ;
plot(xi,yi+d,'g')
plot(xi,yi-d,'g')
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!