I'm having the following issue with my code. I've been trying to use some other posts that I found on line, like this one. But they didn't what I'm looking for.
My code uses a MATLAB Exchange function which optimize a numerical value that is important to be with 32 digits after the dot such as
0.59329669191989231613604260928696
The optimization function can be found here and it is called fminsearchbnd
The optimization function calculate this and store the value in a variable that I use all over my code. In order not to perform the optimization everytime I want to store the variable (I tried either on a *.mat and on a label in the string form.
But when I retrieve it, MATLAB transforms it in a double precision variable 'cutting' all the numbers after the 14th. However I need all of them because they are important!
Is it possible to read a number like that w/o using vpa()
because with a symbolic value I can't do anything.
Any help is really appreciated. Thanks
EDIT:
fminsearchbnd
gives me this class(bb)
-> double
and when I want to see it on the workspace it is 0.586675392365899
. But when I set formatSpec = '%.32f\n';
because I want to see all the numbers that the optimization gives me, typing set(editLabel,'String',num2str(bb,formatSpec))