Rational Numbers diving by 0
1 次查看(过去 30 天)
显示 更早的评论
Hi
I show the result of each data ontop of a bar. I have it working. On top of each bar it shows of the rational of failure/measurements.
ratFailMeasurement=rats(Fail/Measurement);
if Fail is 0, then the answer is 0. this is what is shown on top of the bar. but I want that it shows 0/X-amountofmeasurements.
how to?
0 个评论
采纳的回答
the cyclist
2013-1-4
编辑:the cyclist
2013-1-4
I think you will probably have to convert to a string manually, to display it how you'd like. For example:
[num2str(0),'/',num2str(7)]
You can of course put variable names where I have put hard-coded numbers. You can also use the sprintf() function to have more precise control over the output format.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!