Conditioning a matrix with a huge span

I have a function with 11 variables and I am solving it using fsolve. I am providing initial guesses for these variables as following:
initial_guess=[230000,965820,0.77,0.12,1e-16,1e-16,0.03,0.3,40,40000,342]
The difference is huge between the smallest and largest element in this array. I tried to scale the values using rescale funtion, yet I would have a problem with my function as I call an executive file that runs some calculations, and that needs to use the unscaled values.
The 11 equations in my function have some of the sparsed variables multiplied by each other, for example, variable 1 (230000) is multiplied by variable 4 (0.12), which is fine as the resolution of the number is not lost. Yet, other equations would multiply two small numbers (say 0.3 and 0.03), in which its resolution is lost when compared to the multi-digit number in the same equation.
How can overcome this problem?
Appreciate your inputs.

3 Kommentare

dpb
dpb am 1 Feb. 2021
Don't know there's much can say w/ such sketchy description of the problem space...if the variables are of the proper magnitude for the calculation, seems as it should be fine as is.
Omar Khalifa
Omar Khalifa am 4 Feb. 2021
Pardon the sketchy description of the problem space. The 11 equations in my function have some of the sparsed variables multiplied by each other, for example, variable 1 (230000) is multiplied by variable 4 (0.12), which is fine as the resolution of the number is not lost. Yet, other equations would multiply two small numbers, in which its resolution is lost when compared to the multi-digit number in the same equation.
Omar Khalifa
Omar Khalifa am 4 Feb. 2021
I solved the issue by scaling all the equations (residuals) by a factor that preserves the resolution of the variables concerned.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 1 Feb. 2021

Kommentiert:

am 4 Feb. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by