cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

not compatible units

YA_10963798
8-Gravel

not compatible units

Both of the variables have the same unit, however mathcad said units are not compatible why is that?

2024-03-24.png

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

Formula does not have consistent units.

Capture.JPG

 

View solution in original post

14 REPLIES 14

Hi,

Formula does not have consistent units.

Capture.JPG

 

Thank you so much for your help 

YA_10963798_0-1712002058690.png

the same problem occured again, although I followed the instructions. Can you help me with this please?

Thanks in advance

 

LucMeekes
23-Emerald III
(To:YA_10963798)

If Mi is in MPa, then Mi^2 should be MPa^2...

So either square the MPa under Mi^2, or divide Mi by MPa before you square it:

(Mi/MPa)^2.

 

and

You should attach the Prime worksheet and state which version of Prime you are using.

 

Success!
Luc

Oh that’s it . Thank you

one more question. How to solve the following error ?

YA_10963798_0-1712004394601.png

 

LucMeekes
23-Emerald III
(To:YA_10963798)

attach the Prime worksheet and state which version of Prime you are using

sure 

LucMeekes
23-Emerald III
(To:YA_10963798)

So, that's Prime 9.

You shouldn't evaluate a definition like you did:

LucMeekes_0-1712005245815.png

(That is: do NOT put an = at the end of a definition. Yes, it works, most of the time, but it also causes trouble, more often that you wish for.)

So do:

LucMeekes_1-1712005327745.png

Now exactly what are you trying to do?

you set up a summation with k running from 0 to j-1, but j is a vector because you defined it as a range and used an inline evaluation at its definition which transforms the range into a vector (undocumented behaviour that should be used with caution, if at all). Now Prime will not allow the upper limit of the summation index to be anything other than an integer scalar. So that's your problem 1.

The other problem is that your summand

LucMeekes_3-1712005965860.png

(The stuff you want to sum), does not use the index k. So what is Prime supposed to do?

 

Success!
Luc

 

LucMeekes
23-Emerald III
(To:YA_10963798)

If you want the elements of

LucMeekes_4-1712006276633.png

 and

LucMeekes_5-1712006303379.png

to be multiplied element by element and summed, you can use vectorisation, like this:

LucMeekes_7-1712006467710.png

( That is 1*4 + 2*5 + 3*6 = 4+10+18 = 32)

In your case:

LucMeekes_6-1712006399363.png

Success!
Luc

 

 

This was very helpful , thanks you are the best

I'm having the same issue again 

Why do you think so?

YA_10963798_0-1713773985656.png

 

I would suggest that you open a new thread and attach your worksheet there.

I did 

I attached it below as well

 

The sheet you attached shows a different error compared to the picture you posted above where only G(MPa is highlighted red.

Werner_E_0-1713781990115.png

 

I see you opened a new thread with that question and I already answered it -> https://community.ptc.com/t5/Mathcad/units-are-not-compatible/m-p/945030/highlight/true#M211406

 

Please also note my last answer there because I think that you don't need to divide by the units at all but you have to apply vectorization to get the desired correct results.

Top Tags