how to get whole integers only using degrees2dms
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Im writing a function that returns a bearing given any azimuth. I have everything working except i want degrees2dms to only output whole numbers. Decimals are currently useless to me in this function so i would prefer to have whole numbers.
when i input 75.50275 as an angle into the function it returns [75, 30, 9.90] when I want it to return [75, 30, 10]. I want it to round down if the decimal is less than 5 and round up if it is equal or greater than 5. ie: 9.1 rounds to 9 while 9.6 rounds to 10
any help would be appreciated.
1 Kommentar
Antworten (1)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!