Skip to main content
1-Visitor
November 15, 2010
Solved

"Variable not Defined" error when minimizing a function

  • November 15, 2010
  • 1 reply
  • 5572 views

Hi

Im a new user to mathcad, I have created a mathcad sheet to find an the minimum value of a function by optimizing two parameters(Attached).I believe i have it set up alright but i am getting an error that a vaiable is not defined even though it is.

Can anyone help me to solve this.This problem has been annoying me for the last 2 days.

Thank You

Best answer by RichardJ

Here. I'm not sure you are going to like the answer though.

1 reply

19-Tanzanite
November 16, 2010

Ian Crehan wrote:

Hi

... by optimizing two parameters ...

Your Minimize statement contains nine parameters not two!

Also note (from Minimize help file): "If you are solving for n variables, the solve block must have n equations." Your solve block contains four equations.

Alan

IanCrehan1-VisitorAuthor
1-Visitor
November 16, 2010

I Taught that might be the problem and changed it (attached) But im still getting the same problem. For H two parameters (L0,ξ) need to be changed to optimize the solution while three parameters are user inputted constants (Z,Li,ψ) and the other four parameters are changed by the parameters (Fls,Fas,Mb,Vb).

I am trying another approach of defining the function H as a multiline function including all the previous functions which define H. Im not too sure how to do this but I will give it a go.

Ian

1-Visitor
November 16, 2010

It doesn't look right at all.

three parameters are user inputted constants (Z,Li,ψ) and the other four parameters are changed by the parameters (Fls,Fas,Mb,Vb).

If these are inputted by the user you don't need them to be a function of H.

It's still not clear exactly what your after. Are you trying to find H???

Mike