Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi everyone,
I am trying to solve a problem. I don't know about the implication and equivalence functions. I tried using chatgpt but got a weird answer which I completely did not understand. I copied the answer to Mathcad Prime which is attached below.
Please help me out I will be thankful to you.
Thank you
Regards
Khalid
Solved! Go to Solution.
There's just one thing missing: State which version of Prime you are using. Otherwise you run a higher risk getting an answer in a newer version of Prime, and you cannot open the file.
Anyway, you're using Prime 8.
Now to your problem.
You have defined P, Q and R to be arrays of 1 row and 24 columns. No problem with that.
But in your AND function you multiply the arguments. If you multiply two arrays, vector and matrix rules apply. For two vectors (arrays with n rows and 1 column) this happens:
You don't get a vector as result, but a scalar.
For two arrays like you have, you get:
an error message, stating that the array dimensions do not match.
What Prime might have expected is this:
or this:
Now how do you get the array elements to be operated on (multiplied, in your AND case) element by element? That is done by using the vectorise operator. You place an arrow over the expression to have it vectorised, Like this:
You find the vectorise operator at the bottom right of the operators panel of Prime.
Go ahead and play with it, and come back if you have more questions.
Success!
Luc
It is usually better to rely on your own intelligence than on artificial intelligence.
And why do you think Prime is a suitable tool for this task? I guess that you are not forced to use Prime, aren't you?
Why don't you try working on this homework yourself instead of trying to get a solution via AI or forum questions?
If you try something yourself (not just copying AI garbage), set up a worksheet and get stuck, feel free to come back here, post your sheet (not just pics) and ask a specific question.
If you really want to implement and define Boolean functions in Prime, you could start with
NOT(x):=1-x
AND(x,y):=x*y
OR(x,y):=1-(1-x)*(1-y)
or you use
OR(x,y):=NOT(AND(NOT(x),NOT(y)))
...
Thanks for the quick reply. I missed the class related to this homework but I am trying to learn online. However, following your advice, I am developing a sheet and am now stuck at a point. I have attached the prime file. Thanks again for your help.
There's just one thing missing: State which version of Prime you are using. Otherwise you run a higher risk getting an answer in a newer version of Prime, and you cannot open the file.
Anyway, you're using Prime 8.
Now to your problem.
You have defined P, Q and R to be arrays of 1 row and 24 columns. No problem with that.
But in your AND function you multiply the arguments. If you multiply two arrays, vector and matrix rules apply. For two vectors (arrays with n rows and 1 column) this happens:
You don't get a vector as result, but a scalar.
For two arrays like you have, you get:
an error message, stating that the array dimensions do not match.
What Prime might have expected is this:
or this:
Now how do you get the array elements to be operated on (multiplied, in your AND case) element by element? That is done by using the vectorise operator. You place an arrow over the expression to have it vectorised, Like this:
You find the vectorise operator at the bottom right of the operators panel of Prime.
Go ahead and play with it, and come back if you have more questions.
Success!
Luc
Thanks mate!