how to get whole integers only using degrees2dms
2 次查看(过去 30 天)
显示 更早的评论
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 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!