Perhitungan Azimuth Menggunakan Aplikasi Matlab


INPUT :

clear all;
clc;
disp ('-------------------------------------------------');
disp ('>>>>>>>>Perhitungan Azimuth di Dua Titik<<<<<<<<<');
disp ('-------------------------------------------------');
XA=input(' Absis di titik A (XA)    = ');
XB=input(' Absis di titik B  (XB)   = ');
YA=input(' Ordinat di titik A (YA)  = ');
YB=input(' Ordinat di titik B (YB)  = ');
disp ('-------------------------------------------------');
Q=(XB-XA);
R=(YB-YA);
P=atand(Q/R);

if Q>0 & R<0
    disp(['Degree Azimuth AB = ' num2str((P+180))]);
elseif Q<0 & R<0
    disp(['Degree Azimuth AB = ' num2str((P+180))]);
elseif Q<0 & R>0
    disp(['Degree Azimuth AB = ' num2str((P+360))]);
else
    disp(['Degree Azimuth AB = ' num2str(P)]);
end;


OUTPUT :

1 comments:

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Ary Sukma Putra © 2013. All Rights Reserved. Powered by Blogger
Top