Skip to main content
24-Ruby IV
June 25, 2018
Solved

f(x):=Minimize(OF, ...)

  • June 25, 2018
  • 2 replies
  • 3151 views

I can create user functions thru Given-Find block:

But I cannot do it with Minimize function Smiley Sad

Is it possible? Have you some examples?

Thanks!

 

Best answer by Werner_E

This time its a true catanary by definition, so we don't need a proof 😉

 

As for your problem: I already had written it in my first answer here - the function argument (L in your case) must be also an argument of the function you wish to minimize (PE in your sheet). Even though PE does not need L and L is a dummy argument for PE.

B.PNG

  BTW, in case you hadn't noticed. There is no need to zip or rar Mathcad sheets anymore - they can be attached directly (as it should be).

2 replies

25-Diamond I
June 25, 2018

@ValeryOchkov wrote:

I can create user functions thru Given-Find block:

But I cannot do it with Minimize function Smiley Sad

Is it possible? Have you some examples?

Thanks!

 


Yes, it IS possible. The variable x must also be an argument of the function you try to minimize - even if x is just a dummy argument there.

 

BTW, in both examples above we could use the minimize function standalone as we don't provide any constraints. You could delete the keyword "given" and the function would still work.

 

Post your worksheet so we can see what you are trying to achieve.

 

Here is a very simple example:

B1.PNG

You may also provide the guess value as function argument

B2.PNG

 

24-Ruby IV
June 25, 2018

Thanks!

Compare please two my Mathcad 15 sheets in attach!

May by I do something wrong!

 

Sorry Werner - it is a catenary again! But some fresh problem - a round catenary

 

Werner_E25-Diamond IAnswer
25-Diamond I
June 25, 2018

This time its a true catanary by definition, so we don't need a proof 😉

 

As for your problem: I already had written it in my first answer here - the function argument (L in your case) must be also an argument of the function you wish to minimize (PE in your sheet). Even though PE does not need L and L is a dummy argument for PE.

B.PNG

  BTW, in case you hadn't noticed. There is no need to zip or rar Mathcad sheets anymore - they can be attached directly (as it should be).

21-Topaz II
June 25, 2018

Hi,

 

You can also have the input parameters of your minimize function in constraint functions within the solve block.