title(sprintf('HMNZS AOTEAROA Ship motion in Sea state 6,\n Heading: %3.2f%c Runtime:%4.2f sec'... , d , char(176), t), "Color", [1 1 1]); % Display Graph title with changeing data
I am wanting to display the heading of the vessel in a compass format. Currently, as it goes around in a circle the heading goes up to 758 degrees I believe there is a way to make it only display a heading from 0 to 359 deg.
I think it goes like this
C = Heading / 360 H = ??? % truncate CH to only leave digits after the decimal point
CH = H*360
Not sure how to truncate the whole numbers.
Thanks in advance
Best Answer