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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

24-Ruby IV

Minimize or MinErr

I would like to solve this problem

not with the Minimize function but with the MinErr function.

But do not know how.

The Mathcad 15 and Prime 4 files are in attach.

9 REPLIES 9
24-Ruby V
(To:ValeryOchkov)

Whats wrong with minimize?

Anyway, here is the simplest way of doing it with minerr (you'll have to chose Quasi-Newton as algorithm to get the very same results as with minimze):

BTW, it looks like you are using a 4K display like me. Pictures you grab from hat screen are far to large to be inserted here, making the threads hard to read. You should either resize the pics before posting or choose "medium" as size when you insert them in a thread.

24-Ruby V
(To:Werner_E)

Just gave it a try in Prime4

You have no choice of algorithm

Calculation with minerr takes "endless" time

Result is not as good as the one derived with minimize

Facit: Avoid using Prime whenever possible (and its always possible to avoid).

24-Ruby IV
(To:Werner_E)

Thanks, Werner!

24-Ruby V
(To:ValeryOchkov)

I had not looked in your sheet and your equations in more detail and simply solved with minerr what you had solved with minimize.

You new approach seems to be different as you now have a constant h.

Why aren't you happy with your minimize results?

24-Ruby IV
(To:Werner_E)

Thanks, Werner!

I see it too!

23-Emerald I
(To:ValeryOchkov)

minimizeminerr

24-Ruby IV
(To:Fred_Kohlhepp)

S=?

23-Emerald I
(To:ValeryOchkov)

You defined S as the error function, so minimizing it gave your answers.

Find and Minerr act to satisfy constraints, so finding the minimum error for y(...) = h has the same effect.

Note that Minerr is basically Find where Find can't arrive at an acceptable solution.  It's always wise to find out how bad your "minimum error" is, it can be quite unacceptable.

24-Ruby V
(To:ValeryOchkov)

wrote:

S=?

Freds approach is basically the same as mine. So the result depends on the algorithm chosen (if you use real Mathcad and not Prime). From the values Fred is showing I guess he did not change the default (Levenberg-Marquardt) which (surprisingly, as LM usally ist best choice) gives a slighty worse result compared to Quasi-Newton or conjugate gradients (which s used by minimize).

Announcements
Top Tags