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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Minimize a function on mathcad prime 3.1

bmohamed
1-Visitor

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

first test.PNG

The second methode is using bloc resolution:

second test.PNG

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

File attached.

Please a need a help.

Thanks

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:bmohamed)

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

View solution in original post

13 REPLIES 13

See one example

Thank you for your answer

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

masse t.PNG

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

RichardJ
19-Tanzanite
(To:bmohamed)

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

Werner_E
25-Diamond I
(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".

Mt it's not a matrix i defined it like

mt definition.PNG

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 

RichardJ
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

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

Thank you for your answer

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 :'

RichardJ
19-Tanzanite
(To:RichardJ)

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

I fixed it but still have the problem

ctol problem.PNG

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

i have MC prime 3.1

Werner_E
25-Diamond I
(To:bmohamed)

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

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

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