i wrote a scipt to findout the points satisfying the Equation of a straight line in two-points form (two points are known). i have 3 column of data lat,long depth

1 Ansicht (letzte 30 Tage)
i want to get lat&long satisfying the equation and corresponding depth. s=[]; x=D(1:end,1); y=D(1:end,2); z=D(1:end,3); x1=2.5076; x2=15.5153; y1=53.9917; y2=66.9917; z1=-5040; s = nan(count,3) ; data2=[x1 y1 z1]; data2(1,:) = [x1 y1 z1]; count=length(x); for i=1:count x3=x(i); y3=y(i); equ=(y3-y1)./(y2-y1); eqq=(x3-x1)./(x2-x1); s=[s;x3 y3 equ]; if equ==eqq z=z(i); data2=[data2; x3 y3 z3]; end end

Antworten (0)

Kategorien

Mehr zu Delaunay Triangulation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by