cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

why calculating result is different between excel and Mathcad?

ycho-3
1-Newbie

why calculating result is different between excel and Mathcad?

Recently i got a question while using the mathcad file .

my question is why calculating result is different between excel(before using exel solver's optimization algorithm) and Mathcad(before using Minerr function)?

I know that after computing an "exel solver" or "Minerr function" their value would be apparently different, because excel solver is using an GRG algorithem and Mathcad is using other algorithm such as Quasi-Newton. 

It looks same at a glance, but if you see carefully, their values are not same.

And of course i put the same 18 parameter values in excel and Mathcad.

2 REPLIES 2
LucMeekes
23-Emerald III
(To:ycho-3)

They look 'the same' enough to me, within 1 %.

If you want EXACT equality of the results, you must make sure that both implementations (Mathcad and Excel) use:

- Exactly the same algorithm, e.g.

   When adding small numbers and large numbers together it can make a difference in what order you add the numbers.

- Calculate with the same number of digits.

Success!
Luc

RichardJ
19-Tanzanite
(To:ycho-3)

I posted a much faster (70x faster!) version of that worksheet in an earlier thread: making an Loop with Mathcad, so I'm not sure why you are using the one you posted.

I also pointed out in that thread, and in another one before that (Minerr/nonlinear optimizing) that your minimization problem is extremely badly behaved. If you change anything, the guess values, the algorithm, even how the data is presented to the algorithm, you get different answers. What surprises me is not that your results from Mathcad and Excel are that different, it's that they are that close. And as I also pointed out in an earlier thread, what you found with that Mathcad worksheet is certainly not the global minimum, because the faster version of the worksheet finds one with a lower residual.

So I'll ask once again. What exactly are you trying to achieve? To find the global minimum of your function? To find any minimum with a residual below some threshold? Something else?

Top Tags