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

Running a check statement using If/then, variable undefined

SA_10030091
2-Guest

Running a check statement using If/then, variable undefined

Hi all,

 

I'm currently trying to run a quick check on my Mathcad worksheet that populates a "Yes" or "No" to validate whether the section modulus value is above the required one.  When I place the yes and no variables in the program it says they're undefined.  I switched them to the "keyword" label in hopes that would remedy my situation, but unfortunately I have the same issue.  Attached is a snippet of what I currently have in the worksheet.  Please let me know your thoughts.  Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

This worked great!  Thanks Stuart!

View solution in original post

3 REPLIES 3
StuartBruff
22-Sapphire II
(To:SA_10030091)


@SA_10030091 wrote:

Hi all,

 

I'm currently trying to run a quick check on my Mathcad worksheet that populates a "Yes" or "No" to validate whether the section modulus value is above the required one.  When I place the yes and no variables in the program it says they're undefined.  I switched them to the "keyword" label in hopes that would remedy my situation, but unfortunately I have the same issue.  Attached is a snippet of what I currently have in the worksheet.  Please let me know your thoughts.  Thanks!


 

Have you defined Yes and No?  If not, just put your Yes and No in quotes.

 

Although it would sometimes be useful for Mathcad's numeric engine to return the name of an undefined variable, Mathcad treats undefined variables as an error.

 

If you used Mathcad's symbolic engine, then Mathcad would return the names of undefined variables (it treats them as just symbols).  However, there is normally a performance penalty to pay for using the symbolic engine (it can be quite slow) and it won't do everything the numeric engine will.

 

Here's an example using defined variables.

 

2021 10 04 A.png

 

Stuart

This worked great!  Thanks Stuart!

View solution in original post

Hi,

I ask the question a little differently as it is easier to understand like this.

Capture.JPG

Cheers

Terry

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."