MATLAB: Applying vpa function for fsolve

fsolveprecisonvpa

%I need high precision while using fsolve function. My equations are badly scaled.
%I need to have like 100 digits after the decimal point. How can I perform this in the below codes?
F=@(x0,y0,z0)[(-4.71777*10^21)+(2.10263*(10^15)*x0)-(3.49196*(10^8)*(x0^2))+(28*x0^3)+(1.56321*(10^14)*y0)-(3.76035*(10^7)*x0*y0)-(1.16399*(10^8)*y0^2)+(28*x0*y0^2)+(1.11156*(10^15)*z0)-(2.6739*(10^8)*x0*z0)-(1.16399*(10^8)*z0^2)+(28*x0*z0^2)
(-7.62057*10^20)+(1.56321*(10^14)*x0)-(1.88017*(10^7)*x0^2)+(1.16012*(10^15)*y0)-(2.32797*(10^8)*x0*y0)+(28*(x0^2)*y0)-(5.64052*(10^7)*y0^2)+(28*y0^3)+(1.7955*(10^14)*z0)-(2.6739*(10^8)*y0*z0)-(1.88017*(10^7)*z0^2)+(28*y0*z0^2)
(-5.41882*(10^21))+(1.11156*(10^15)*x0)-(1.33695*(10^8)*x0^2)+(1.7955*(10^14)*y0)-(1.33695*(10^8)*y0^2)+(2.41161*(10^15)*z0)-(2.32797*(10^8)*x0*z0)+(28*(x0^2)*z0)-(3.76035*(10^7)*y0*z0)+(28*(y0^2)*z0)-(4.01085*(10^8)*z0^2)+(28*z0^3)
]
fun=@(u) F(u(1),u(2),u(3));
x0=[4157000,671400,4774000]
[u1,fval1]=fsolve(fun,x0)
%actually fsolve function cannot find the solution therefore I want to try high precison, maybe it affects the solution.

Best Answer

You only have 6 digits of precision on your constants. You cannot meaningfully get out 100 digits of precision for the solution.
How close to 0 does F(u) need to be? For example, 25 digits gets F(u) to [-0.12e-1, -0.407e-4, -0.270e-2]
x0, y0, z0 have values that are primarily based on
roots([8730629105141324856992021631, -93154703113022319253101652905801, +5290130260748861049670439977885516000, -31683393121913492781344590435395215781250, +76812469157230892953736692218437414062500000, -92730743959203172134758219842091308593750000000, +57514411629616551846078000573281250000000000000000, 15761383693267952488406258764282226562500000000000000])
but of course carried out to more digits than the default.