Precision number throughout scripts and functions.
6 views (last 30 days)
I have a script that calls many functions, when I run the script I want matlab to use a specific value of precision throughout. I have seen the documentation https://uk.mathworks.com/help/symbolic/increase-precision-of-numeric-calculations.html but this seems to just increase the precision for one single calculation?
Is there a way to set the precision to run throughout my entire code?
Chunru on 15 Nov 2021
You can use "format" command to specify a format such as short, long, shortE, shortG. "doc format" for more information.
If you do want to have complete control of the display format, you need to use "fprintf" command.