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

How do I make a list in Mathcad Prime

Arnoldo_Idolo
4-Participant

How do I make a list in Mathcad Prime

Hello, I am trying to do a "list" of numbers in Mathcad, like that :(4.6, 5.6, 8.8). It is for programming purpose as I want to do an "If" condition if my variable is equal to one of those values. What I really want to do is get α_v in function of the grade of the bolt and if the shear stress passes through the threaded portion of the bolt (see pic). 

Arnoldo_Idolo_0-1684766704245.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

You need to create a table and use the "match" function.  Attached is Prime 4

View solution in original post

4 REPLIES 4

You need to create a table and use the "match" function.  Attached is Prime 4

Hello Fred, 
Thank you for your answer, simple and effective. Occam's razor really is sometimes the right way to solve problems.
Have a fantastic day!

As so often there a many ways to achieve the desired goal.

You may add the variable value for alpha as an output of the first combobox and override it by the single value 0.6 in case that the second combobox returns "no".

Werner_E_1-1684788245477.png

In a combobox it is not necessary to provide the first column of display names. If you don't, the first column of return values is used instead for display. There is also an option to hide the left hand side with the variable(s) of a combobox and you can assign the output of a combobox to a vector of variables.

I made use of this and you can see how if you select a combobox (right mouse click) and chose "edit".

Unfortunately what PTC implemented as combobox is very basic and limited. Otherwise it would be able to use variables in the return vectors and so selecting "yes" could return alpha_v and "no" would return 0.6. That way we could do without the region with the if function. Maybe PTC will improve their unfortunate creation in a future version.

 

Hello Werner, 
I like your answer a lot! Thanks for your time, I really appreciate it. Those comboboxes tips surely are going to help me
Have a fantastic day!

Top Tags