long digit scaled fixed point?

i want to see very long digit scaled fixed point
Example: i have a number: 8.123 e-15. And after that. e-16 become to 0. And i want see more. Anyone can tell me how to fix this? . Many thank.

 采纳的回答

I ma not certain what problem you are seeing.
The format function may be what you want.
For example:
format long e
n = 8.123e-15
n = n/100
produces:
n =
8.123000000000000e-15
n =
8.123000000000000e-17

7 个评论

here is my problem. i don't know how to fix this. Many thank
I am not certain what the actual problem is. That appears to be the iteration output of of an optimisation function, so the format is likely controlled from within the function. In that instance, there is likely not much you can do about it, since that would involve hacking the function, never a good idea.
Also, the jump from 5.0487e-29 to 0 in one iteration is unlikely to be due to precision, since the smallest floating-point number (on my computer) is 22.2507e-309, produced by the realmin function. The optimisation function is apparently deciding on its own that the cost function output smaller than 5.0487e-29 is effectively 0. That could be due to the way the tolerances are set within the function (although you can likely change them with an options structure for the fucntion if you want to).
Be sure to return as many outputs from the optimisation function as seems reasonable, particularly the final function value. That may be what you actuallky want.
Thank you, sir. I'll check again my function. many thank.
As always, my pleasure.
Your objective function or cost funciton is likely not the problem. This is most likely the expected behaviour of the optimisation function you are using.
i find out my problem. It is boundary condition of my function. many thank sir.
As always, my pleasure.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Spline Postprocessing 的更多信息

产品

版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by