sprintf with leading minus sign
20 views (last 30 days)
Show older comments
I am trying to use SPRINTF to print the following variable's value. How to print it so it does not without the minus sign
>> %This is NOT what I want
>> x=-0.000001; sprintf('%6.2f',x)
>> %This is what I want
pfb on 27 Apr 2015
Not sure you can eliminate the minus sign. I think what you are saying is basically
Christian D on 5 Aug 2016
I have the same problem, this minus annoys me.
I think a workaround is using the round or roundn on that numbers.
Is there any other solution than that?
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!