Higher precision in MATLAB App Designer
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (2)
Steven Lord
il 9 Mar 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 Commenti
Walter Roberson
il 10 Mar 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
il 10 Mar 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 Commenti
Walter Roberson
il 10 Mar 2021
In my experience, plots are done at single precision internally (though I no longer recall the context for that.)
Vedere anche
Categorie
Scopri di più su Numbers and Precision in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!