clc MB=5.5 MD=1 PD=8.5 TB=MB+MD MB=TB-PD k=360+MB printf('Magnetic Bearing = %f degrees',k)