Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

New to mathcad prime, problem with Atan & formulas 2

Status
Not open for further replies.

Walterke

Industrial
Jun 22, 2011
451
0
0
BE
Hi guys

I just installed mathcad prime and have come to my first problem where google doesn't help me solve it.

If you'll see attached image, you'll see the formula "betha", where I want to calculate the arc tan of something.
(note that ptx10, pty10, L9 & L10 are predefined higher up in the file)

When I fill in an angle in the betha formula, i get the error: "This value must be a scalar or a matrix"

Now, when I pre-calculate the formula (pretan(a)) and then take the atan of that (formula gamma) it DOES work.

Can anyone explain where the difference lies?

NX 7.5.5.4 with Teamcenter 8 on win7 64
Intel Xeon @3.2GHz
8GB RAM
Nvidia Quadro 2000
 
Replies continue below

Recommended for you

Pictures of worksheets might be good for Flickr or Tumblr, but not so good for debugging. However, sheets posted in the older possible version would be preferred, i.e., Mathcad15

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
Hmmm - looks like a bug in Mathcad Prime 2. I get the same error as you when I download your worksheet, but I can't for the life of me see what is wrong with your expression.

Suggest you report this to PTC, and / or post on the official PTC Mathcad forums - good luck! (Just reinforces my view that Mathcad Prime isn't ready for prime-time use yet.)

 
Hmmm, looks like a bug in the brain-keyboard interface ;-)

There's a multiplication sign between the atan and the parentheses in the definition of Beta. Had you copied the entire expression on the right hand side for evaluation, the atan would be highlighted as being in error.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
Well spotted, IRstuff!

Interesting that Mathcad Prime 2 doesn't display the multiplication symbol between the "atan" and the leading parenthesis in the on-screen function definition (until you attempt to edit the function definition), whereas all other multiplication symbols are displayed on-screen. Nor does Mathcad Prime 2 flag the original function definition as being in error - the error message pops up in the first USE of the mis-defined function. In Mathcad Prime 2, I get the error message "This value must be a scalar or a matrix" applied to the whole expression where I first USE the mis-defined function, with the whole expression "Beta(60.deg)" being highlighted in red, so it is not clear at all WHICH value "must be a scalar or a matrix".

In Mathcad 15, if I try to replicate the same sort of error, I see the multiplication symbol displayed within the original ill-structured function definition, and the "atan" in the function definition is flagged in red, with the error message arising in the statement where I mis-define the function. That is, in Mathcad 15, I see "atan" flagged as an error, with "This value must be a scalar". This is a bit confusing until you realise that Mathcad 15 is telling you that you can't multiply a function name ("atan") by the contents of the parentheses.

I like the Mathcad 15 approach better, as it is a heck of a lot easier to track down such typographical errors if the error message is tagged to the location where the syntax error first arises.

 
@IRStuff:

Also, in your first reply, you said that it would be preferable for the OP to post a copy of the worksheet in an older format, such as Mathcad 15. Unfortunately, Mathcad Prime 2 has no ability to "Save As" Mathcad 15 or earlier versions, as far as I can tell - all it supports as exports are *.mcdx or *.xps. [mad]

 
righto, my own brain/keyboard interface bug -- I'd forgotten that there is no down convert capability in MP.

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529
 
Damn PEBKAC's are the worst. Sorry for the trouble, but "invisible multiplication symbols" weren't on my checklist.

Thanks for the help.

I'll see you all soon in my next thread :p

NX 7.5.5.4 with Teamcenter 8 on win7 64
Intel Xeon @3.2GHz
8GB RAM
Nvidia Quadro 2000
 
Status
Not open for further replies.
Back
Top