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

Defined Variable is Unrecognized in Solver Block

IW_10965993
3-Newcomer

Defined Variable is Unrecognized in Solver Block

New to Mathcad, running into an error I can't resolve. I have defined all of my matrices and variables up top, but in the solver block there are unrecognized variables. Error is: "This variable is undefined. Check that the label is set correctly." Anyone have an idea what might be going on? See screenshot below. 

 

Using Mathcad Prime 9.0.0.0

ACCEPTED SOLUTION

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

Whenever possible you should attach the worksheet or a simplified worksheet with dummy, non-sensible data because its always hard to debug just a picture.

From your picture I would say that you have to use the boolean equal sign in your two constraints, not the evaluation equal as you did.

Werner_E_0-1708714583246.png

 

View solution in original post

5 REPLIES 5
Werner_E
25-Diamond I
(To:IW_10965993)

Whenever possible you should attach the worksheet or a simplified worksheet with dummy, non-sensible data because its always hard to debug just a picture.

From your picture I would say that you have to use the boolean equal sign in your two constraints, not the evaluation equal as you did.

Werner_E_0-1708714583246.png

 

Good to know, for future questions I'll attach the worksheet! Your suggestion solved the issue with the constraints, although the minerr block is still red, the error is "This function is misplaced. Move it to a solve block with one solve function only." Any ideas?

Werner_E
25-Diamond I
(To:IW_10965993)


@IW_10965993 wrote:

Good to know, for future questions I'll attach the worksheet! Your suggestion solved the issue with the constraints, although the minerr block is still red, the error is "This function is misplaced. Move it to a solve block with one solve function only." Any ideas?


Not yet. You have just used the boolean equals and have put the vectors P1000 and P3000 on the right hand side?

I wonder why P1000 and P3000 are bold blue (labelled as units)  in your screenshot (maybe this was done automatically as you seem to have written them in the unit placeholders. They sure should be labelled as "Variable".

Would have to see the sheet to say more, though.

You can try to embed some dummy data in the sheet so you won't have to attach the four Excel files as well.

 

Just stabbing in the blue ... if you move the solve block, does the expression with "minerr" move as well. If not then its not placed inside the solve block and you should put it there via cut & paste.
Actually thats my best guess without seeing the sheet that you type the "minerr" region somewhere outside of the solve block and then just moved it there by dragging it - silly as it is this does not work. You have to use cut and paste (or retype it inside the solve block.

 

You are correct! As I move the solve block the contents don't move with it. Here is the file with the data. Thanks for the help. 

Werner_E
25-Diamond I
(To:IW_10965993)

So my guess was correct.

The solution also is a was written above: Cut and paste the "minerr" region to the solve block. When I tried to do so it was also necessary to re-label "minerr" as  "Keyword" because Prime had labelled it wrong.

After doing so the sheet works OK.

 

I additionally added units (even though it seems to be an empircal formula making it necessary to remove the unit when using it) and also got rid of the p1000 and p3000 functions. There is nothing wrong using them but I felt that there is no need for doing so.

Werner_E_0-1708795484472.png

Prime 9 file attached

 

Announcements

Top Tags