Ask your own question, for FREE!
Mathematics 6 Online
OpenStudy (anonymous):

boolean expression help using mathcad

OpenStudy (anonymous):

OpenStudy (tkhunny):

Okay. Did you do 1a)? Let's see it.

OpenStudy (anonymous):

for the the first problem my number that i'm supposed to do is 23 and so far I have x:=23 and as far as getting it to display a 1 i'm not sure of

OpenStudy (anonymous):

is it x>23,2,1?

OpenStudy (e.mccormick):

Well, you are testing against 30...

OpenStudy (anonymous):

yes

OpenStudy (tkhunny):

I'm reading 30. Why do we care about 23?

OpenStudy (anonymous):

because i have to compare my number to it and my number with an single boolean expression has to make a "1"

OpenStudy (e.mccormick):

Yes, but you are comparing the assigned x to 23, not to 30.

OpenStudy (anonymous):

i mean has to display a '1'

OpenStudy (anonymous):

yes

OpenStudy (tkhunny):

You are not understanding your assignment at all. You must compare to 30. You must compare ALL values to 30. You can't just pull 23 out of a hat. It has to work for x = 23, sure, but it also has to work for EVERYTHING else.

OpenStudy (anonymous):

oh okay so it should look maybe something like x:=23<30=1

OpenStudy (e.mccormick):

Your assignment of a variable and the function that tests it do not need to be on one line. Just the expression for testing it is on one line.

OpenStudy (e.mccormick):

Assign variable to any non-complex number. Test variable with Boolean expression. See result.

OpenStudy (tkhunny):

Why do you keep pulling out 23? Get that out of your head. There is nothing in the problem about 23. Try this: \(f(x):=if(x<30,2,1)\) Now, if you really want to, try \(f(23)\).

OpenStudy (anonymous):

i'm forgetting what the set up for it is y:=30,x^2,x^3 or y:= 30,2,1

OpenStudy (tkhunny):

You may need to spend more time with your user's manual. You do not seem to have a very good grip in the syntax.

OpenStudy (anonymous):

@e.mccormick for the third prblem i have A B(A+C) EF Q=A+B(A+C)+EF

OpenStudy (tkhunny):

Seriously, just write the expression I gave you and prove that it works. What version of MathCad are you using?

OpenStudy (e.mccormick):

This may help: http://claymore.engineer.gvsu.edu/~jackh/eod/courses/egr345/media/mathcad.pdf Someone else's short version: http://www.engr.colostate.edu/ECE562/mathcad.pdf They are named the same, but different files, so you may need to change a name to get both.

OpenStudy (anonymous):

i don't have access to mathcad right now that's why i need serious help. if i had access to it i would understand it better because the examples are there

OpenStudy (anonymous):

@tkbunny i'm using 3.0

OpenStudy (tkhunny):

Here's a plan. Go get access. Actually, you're not using 3.0 since you don't have access. I presume that's Prime 3.0 and not the version from 1992, the original 3.0.

OpenStudy (e.mccormick):

http://www.ptc.com/product/mathcad/free-trial/

OpenStudy (anonymous):

for the first one 1a) i have it set up like f(x)=x<30)*23 is this correct?

OpenStudy (anonymous):

for the first one 1a) i have it set up like f(x)=x<30)*23 is this correct? for 1b) i have f(x):=if(x<30,2,1)? and for 2a) i have A B(A+C) EF Q=A+B(A+C)+EF? are all off this correct?

OpenStudy (amistre64):

this is a bit more specific then 'a boolean expression' i havent played in mathCad so im not going to be useful with this

OpenStudy (unklerhaukus):

for the first one i would be thinking something like f(x) = 1 + (x ≥ 30)

OpenStudy (unklerhaukus):

but i dont know mathcad notation/ syntax

OpenStudy (anonymous):

he only went over this once

OpenStudy (unklerhaukus):

f(23) = 1 + (23 ≥ 30) = 1 + False = 1 + 0 = 1 f(64) = 1 + (64 ≥ 30) = 1 + True = 1 + 1 = 2

OpenStudy (anonymous):

@tkhunny and @e.mccormick read my last post am i correct about all three problems?

OpenStudy (tkhunny):

It is normally considered bad form to include Boolean calculations in the middle of an expression. If you are going to write something Boolean, then code it as Boolean. \(f(x)=1+(x≥30)\) produces 2 for 30, 2 for > 30 and 1 for < 30. Is that what you want? It's not obvious by quickly glancing. You have to ponder it to see what it is doing. Plus, I would not consider this a "single Boolean expression". \(f(x)=(x<30)∗x\) is just no good. This produces 0 for 30, 0 for > 30 and x for < 30. Plus, it's very ugly and very hard to understand. Seriously, just write what you mean. Write an expression that is easily understood. \(f(x):=if(x<30,1,2)\) - Done. It is clear what this means. At a glance, it is clear. Unless there is some compelling argument about speed (which is unlikely), why would you do anything else? Some people like to make things LESS clear. I don't recommend that. I'm not real clear on how the first two are different. Boolean Expression: \(if(x<30,1,2)\) Function: \(f(x) := if(x<30,1,2)\)

OpenStudy (anonymous):

sorry for the confusion

OpenStudy (anonymous):

and yes for the 2 problem i need to write it as A or B and C or C or E and F un like how i had it?

OpenStudy (tkhunny):

(A) or (B and (C or D)) or (E and F) Why is "A" in the second expression?

OpenStudy (anonymous):

oh s orry about that my mistake

OpenStudy (anonymous):

@tkhunny thanks for your help

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!