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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Given-Find to Block Solve

MA_10190545
6-Contributor

Given-Find to Block Solve

Hello, I am tasked with updating our programs from MathCAD 15 to Prime 7.0. The below was a Given-Find statement in 15 and has worked for many years just fine. Now Prime 7.0 has changed to SolveBlock and is flagging R' in the constant as "R' has multiple definitions, you must specify a label to select the definition that you want".

 

Note the 'guess values' were added to the solve block in hopes that would solve the issue, it didn't work, since the new block did not have a guess value upon conversion

MA_10190545_0-1643318701403.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
MA_10190545
6-Contributor
(To:Werner_E)

OMG Werner. Prime is so picky. I went to a different program that uses the same equation and updated there with no problems. Copied that into the original program and now it's working just fine. Thanks for all the help.

View solution in original post

8 REPLIES 8

You have to delete and retype all occurrences of R', r' and C' in the solve blocks using the straight apostrophe

 

MA_10190545
6-Contributor
(To:Werner_E)

Werner, Thanks for the previous help. I got past that speed bump only to find another. Further down the calc at the output EBOLT errors stating, "this function accepts at most 6 arguments but is applied to 7". As before, this is an old equation that has worked for a very long time in previous releases. If I remove any of the arguments from EBOLT then the whole thing shuts down. Also, in the definition for EBOLT, below, the TOL is printed in bold; does that mean there is some issue occurring with that. Could part of the issue be stemming from Vo, V1, V2 in the EBOLT definition? They were flagging as "undefined" so I defined them above equal to 1. 

 

MA_10190545_0-1643387278701.png

 

MA_10190545_1-1643387595306.png

 

 

TOL is a built-in variable. MathCAD Prime has a few of those. See the full list here:

 

PTC Mathcad Help

 

Name
Default Value
Use
TOL
0.001
Controls the convergence precision of some functions such as integrals, derivatives, odesolve and the root functions.

 

Are you trying to use TOL as the built-in TOL, or is it a variable you have set?

TOL is a system variable you can change either like a normal variable in the worksheet or via the menu ("Calculation" ribbon). Because is a system variable it shows in straight bold letters, there is nothing wrong with it.

 

It should not be necessary to define v[0 and v[1 in front of the function definition of EBOLT because this vector v is assigned in the function itself by calling either the function SB or SB2.

 

The worksheet I posted works OK and does not throw an error.

 

If you remove the argument b when you define the function EBOLT the function will still work OK because there is also a worksheet variable b defined in the sheet and this value is used in the function.
But I don't understand why you did so!??

 

If  you omit argument b in the function definition you create a function with six instead of the original seven arguments. So when you call the function you also have to provide six and not seven arguments. You provided still seven arguments and so the function call must fail (and thats what the error message is trying to tell you).

Delete the b when you evaluate the function and its should work OK

Werner_E_0-1643413188984.png

 

MA_10190545
6-Contributor
(To:Werner_E)

Werner, Thank you again for your response in this matter. I updated EBOLT as you suggested, and it is just a cycle of error codes. I don't know what is happening on my end, but this thing just will not work for me. As stated previously for some reason my file is requiring that v[0, v[1, and v[2 be defined, see below. If I do define them as '1' above, the equation for EBOLT errors stating that "The matrix must be square. It must have the same number of rows and columns."

 

 

MA_10190545_0-1643641051337.png

 

MA_10190545_2-1643643499637.png

 

 

 

 

 

Whats the difference between the file I posted and the one you are working on?

Guess you will have to post your modified sheet.

MA_10190545
6-Contributor
(To:Werner_E)

OMG Werner. Prime is so picky. I went to a different program that uses the same equation and updated there with no problems. Copied that into the original program and now it's working just fine. Thanks for all the help.


@MA_10190545 wrote:

OMG Werner. Prime is so picky.

Oh how true!!

Glad it works for you now.

Top Tags