Rank: Advanced Member Groups: Registered
Joined: 20/03/2019(UTC) Posts: 73 Location: Mandeville, LA
|
Can text be included in an if statement? For example: If "Thin-walled pipe anchored throughout" then P=1-v. I have various conditions that different formulas would be used depending on the conditions, see below.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
Hi. You have some options for do that. Here are two: Best regards. Alvaro.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Razonar You have some options for doing that. Easy to complete the conditions, thus the project. Cheers Alvaro ... Jean
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/03/2019(UTC) Posts: 73 Location: Mandeville, LA
|
I don't understand how to input the data into the statement. If I press the space key, the input ends, and I cannot input anything.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Britt1 I don't understand how to input the data into the statement. If I press the space key, the input ends, and I cannot input anything. There is no space key to press. Construct the snippet, done.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/03/2019(UTC) Posts: 73 Location: Mandeville, LA
|
Sorry, I have never constructed a snippet before. How do I do that?
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Britt1 Sorry, I have never constructed a snippet before. How do I do that? Construct the math regions as per the image that we call snippet.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/03/2019(UTC) Posts: 73 Location: Mandeville, LA
|
I tried to construct it. My question is how to do that. I try and the below is what happens:
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
g(str,x):=then from menu f(x), then cases, then fill-in
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 14/09/2013(UTC) Posts: 90 Was thanked: 24 time(s) in 16 post(s)
|
The cases() function is included into the "custom functions" plugin, so you should also be sure to have it installed.
|
1 user thanked fedeghi for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/03/2019(UTC) Posts: 73 Location: Mandeville, LA
|
Originally Posted by: fedeghi The cases() function is included into the "custom functions" plugin, so you should also be sure to have it installed. Thank you. I had the "custom functions" plugin installed, but the use of it is not in any of the manuals, at least not that I could find. I had no idea I had to type the word "cases" to get to the input.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/03/2019(UTC) Posts: 73 Location: Mandeville, LA
|
Originally Posted by: Jean Giraud g(str,x):=then from menu f(x), then cases, then fill-in Thank you. I understand now.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Britt1 I had no idea I had to type the word "cases" only click the function 'cases' from the f(x) menu. In the right most place holder of the first 'if' place the cursor type coma, coma [,,] that gives another line of conditions ... and so on.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/03/2019(UTC) Posts: 73 Location: Mandeville, LA
|
Originally Posted by: Jean Giraud Originally Posted by: Britt1 I had no idea I had to type the word "cases" only click the function 'cases' from the f(x) menu. In the right most place holder of the first 'if' place the cursor type coma, coma [,,] that gives another line of conditions ... and so on. Thank you. I was trying to figure out how to do that.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/03/2019(UTC) Posts: 73 Location: Mandeville, LA
|
Originally Posted by: Jean Giraud Originally Posted by: Razonar You have some options for doing that. Easy to complete the conditions, thus the project. Cheers Alvaro ... Jean I use the cases function to type everything in, but when I go back to the first line that says "x if str", as soon as I type "x if str =, as soon as I type the = sign, I get "x not defined". I am trying to understand, but not getting it yet. I had it almost working, but then this glitch appeared.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/03/2019(UTC) Posts: 73 Location: Mandeville, LA
|
Originally Posted by: Britt1 Originally Posted by: Jean Giraud Originally Posted by: Razonar You have some options for doing that. Easy to complete the conditions, thus the project. Cheers Alvaro ... Jean I use the cases function to type everything in, but when I go back to the first line that says "x if str", as soon as I type "x if str =, as soon as I type the = sign, I get "x not defined". I am trying to understand, but not getting it yet. I had it almost working, but then this glitch appeared. I figured out how I did it before. I cannot type the = in the above, but it works with a :=. But it does not really work, because if I say str:="b" and x:=7, the answer is 21.99 instead of 14, but it does allow me to type it. I am confused.
|
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Britt1 I figured out how I did it before. I cannot type the = in the above, but it works with a :=. But it does not really work, because if I say str:="b" and x:=7, the answer is 21.99 instead of 14, but it does allow me to type it. I am confused.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,648 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
Originally Posted by: Britt1 Originally Posted by: Britt1 Originally Posted by: Jean Giraud Originally Posted by: Razonar You have some options for doing that. Easy to complete the conditions, thus the project. Cheers Alvaro ... Jean I use the cases function to type everything in, but when I go back to the first line that says "x if str", as soon as I type "x if str =, as soon as I type the = sign, I get "x not defined". I am trying to understand, but not getting it yet. I had it almost working, but then this glitch appeared. I figured out how I did it before. I cannot type the = in the above, but it works with a :=. But it does not really work, because if I say str:="b" and x:=7, the answer is 21.99 instead of 14, but it does allow me to type it. I am confused. Please post the worksheet or a screenshot. In the second column of cases you have to use boolean equals, not the assignment operator. You can find the boolean operators in one of the palettes on the right of your screen, hovering the mouse hover the symbols you should see the keyboard shortcut. |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/03/2019(UTC) Posts: 73 Location: Mandeville, LA
|
thank you. I can't use the "Thank" button because every time I do, it says "error occurred"
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 20/03/2019(UTC) Posts: 73 Location: Mandeville, LA
|
Originally Posted by: Jean Giraud Originally Posted by: Britt1 I had no idea I had to type the word "cases" only click the function 'cases' from the f(x) menu. In the right most place holder of the first 'if' place the cursor type coma, coma [,,] that gives another line of conditions ... and so on. How do I remove a line. I tried backspacing, and it did not work.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.