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 PTC Community Badges. Engage with PTC and see how many you can earn! X

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

ValeryOchkov
24-Ruby IV

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

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!

 

1 ACCEPTED SOLUTION

Accepted Solutions

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).

View solution in original post

7 REPLIES 7


@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

 

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

 

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).

Опс!

I have used yet this dummy argument in other task


@ValeryOchkov wrote:

Опс!

I have used yet this dummy argument in other task


Yes, I thought that this feature is familiar to you anyway.

But we often forget about such tricks when we do not use them for a longer time.


@Werner_E wrote:

@ValeryOchkov wrote:

Опс!

I have used yet this dummy argument in other task


Yes, I thought that this feature is familiar to you anyway.

But we often forget about such tricks when we do not use them for a longer time.


Yes!

See please the Fig.2 here

Die Physik vs. Computer: Das Polygonseil - Die Statik, Kinematik und Dynamik Or Newton vs. LaGrangesche

Hi,

 

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

 

 

Top Tags