1 2 3 4 5 6 7 8
clc MB=5.5 MD=1 PD=8.5 TB=MB+MD MB=TB-PD k=360+MB printf('Magnetic Bearing = %f degrees',k)