Higher precision in MATLAB App Designer
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am developing a GUI with App Designer and the calculations need precision upto 16 decimal places. Under normal circumstances "format long" can be used to increase the precision. How can high precision be obtained in the App environment?
0 Kommentare
Antworten (2)
Steven Lord
am 9 Mär. 2021
The format function does not "increase the precision" of calculations. All it does is change how the values are displayed in the Command Window. If you want control over how the numbers are displayed in App Designer take a look at the sprintf function.
5 Kommentare
Walter Roberson
am 10 Mär. 2021
Note that Mandelbrot may act differently with symbolic computation. Symbolic computation is modeled as if it were carried out in decimal, but if you search a while you can find references indicating that the computation is done in groups of 9 decimal digits (10^10 is just under 2^30).
But if you push the tests hard enough that doesn't quite work out and the implication would seem to be that rationals are stored in groups of 30 bits rather than in decimal. Design documents that talk about this are... scarce.
Symbolic floating point computation is carried out with 5 guard digits beyond the digits() setting, and appears to be calculated in decimal... maybe.
Steven Lord
am 10 Mär. 2021
How far do you expect your users to want to zoom in? What do you expect typical limits of the region of interest to be? If it falls within the limits of quadruple precision you may be able to calculate the results using Cleve's prototype or a MEX-file doing quad precision calculations in C or C++, but I don't know if you'll be able to plot it. My guess is that figures, axes, etc. won't be very happy trying to display numbers on the order of say 1e-4000.
2 Kommentare
Walter Roberson
am 10 Mär. 2021
In my experience, plots are done at single precision internally (though I no longer recall the context for that.)
Siehe auch
Kategorien
Mehr zu Numbers and Precision finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!