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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

1-Newbie

## Minimize a function on mathcad prime 3.1

Hello guys,

I want to minimize a function, i use to method of minimizing without any result i have one error msg for each one

The second methode is using bloc resolution:

but also i have an error that my entry must be a matrix.

File attached.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V
(To:bmohamed)

Guess you also have to turn Mt into a function of OD,ID and H.

13 REPLIES 13
24-Ruby IV
(To:bmohamed)

See one example

i define Mt like a fonction, I don't understand how he don't considere it like a function ?

And even if i remove the Mt from the "Minimize" function a still have the problem with CTOL and TOL.

19-Tanzanite
(To:bmohamed)

Why do you think that's a function definition? Mt has no arguments. You need this:

24-Ruby V
(To:bmohamed)

> I want to minimize a function

Cant read your file at the moment, but from Valerys screenshot I see that you don't have a function Mt to minimize. Mt looks like a 1x1 matrix (why?).

You may give "minerr" a try instead of "minimize".

1-Newbie
(To:Werner_E)

Mt it's not a matrix i defined it like

and i tried with Minerr but the problem don't change they told me that i have a problem with the value of H " that may be a scalar or matrix) the probleme is always the same when i use a solve box

19-Tanzanite
(To:bmohamed)

It's a matrix because of this:

You inserted "square brackets" by using the matrix tool. They are not just cosmetic. If you retype it correctly you should have

19-Tanzanite
(To:bmohamed)

In your first inequality you have Bmax as a function on the left, and a variable on the right. It is actually possible to do that, but you have to set the labels differently for the function and the variable. The way you have it now, your function definition overwrote your variable definition. Even though you could have Bmax as both a function and a variable, I would consider that very bad practice, because you are relying on only the formatting of a font (italic vs upright) to distinguish the two.

1-Newbie
(To:RichardJ)

that was a good point about Mt, "square brackets" and about Bmax.

I rectify the three mistakes but stil have problem with TOL and CTOL.

So the problem still here :'

19-Tanzanite
(To:RichardJ)

Evidently the variable should be B_max, not Bmax. With that and the other fixes, it works.

1-Newbie
(To:RichardJ)

I fixed it but still have the problem

and i can't open your fill they told that use they version that i don't have !

i have MC prime 3.1

24-Ruby V
(To:bmohamed)

Guess you also have to turn Mt into a function of OD,ID and H.

19-Tanzanite
(To:bmohamed)
 beddiyouh mohamed wrote: and i can't open your fill they told that use they version that i don't have ! i have MC prime 3.1

Unfortunately, I have 3.0 and 4.0, but not 3.1. 3.0 cannot read your file, and 4.0 cannot save in a format you can read! A completely ridiculous situation.

1-Newbie
(To:RichardJ)

Werner Exinger‌ gave me a correct answers with a version that i have.

Richard Jackson‌ Yeah it's a real rediculous one

Thank you guys for all, that was a big help for me :

Well done my saviors

Announcements
Top Tags