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 (최근 30일)
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Read and Write Image Data from Files에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by