How to get more significant figures in Optimization solutions

I would like to know how to increase the number of significant figures/decimal places displayed in the "Final Point" section of the Optimization Tool.

 Respuesta aceptada

Andrew Newell
Andrew Newell el 27 de En. de 2011
I don't know how to change the display, but you could export the result using File > Export to Workspace and look at it with format set to long.

2 comentarios

Dean
Dean el 28 de En. de 2011
After doing this, three variables, "optimresults", "optimproblem" and "options", are created in the workspace. Strangely, none of these variables explicitly display the solution.
optimresults.x does.

Iniciar sesión para comentar.

Más respuestas (2)

the cyclist
the cyclist el 27 de En. de 2011
I'm not sure if this will affect the display of the Optimization Tool, but from the command window menu bar, you can go to Preferences -> Command Window and select the Numeric format from the Text Display section.
There may also be a separate list of options for the Optimization Toolbox (like there is for the Database Toolbox). I don't know for sure, because I don't have it.
Dean
Dean el 28 de En. de 2011
A roundabout way of obtaining more significant figures I figured out is to open the Optimization Tool, specify the optimization problem as you would normally, then go to File-->Generate M-file and save the M-file, as say OPTIM.m. As the cyclist mentioned above, you can adjust the sig figs in the Command Window by going to Preferences -> Command Window and select the Numeric format from the Text Display section. In the Command Window, you can then type OPTIM(input1,input2,..) where input1, input2, etc are numerical values for the inputs to OPTIM in the order listed in the M-file. This will give the optimization solution in the Command Window.

Preguntada:

el 27 de En. de 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by