Skip to main content
10-Marble
December 8, 2023
Solved

MathCAD programming

  • December 8, 2023
  • 2 replies
  • 1973 views

Hi All, 

I have been given the task of trying to make this MathCAD program work in Prime. It works perfectly well in MC15 but throws up unit errors in Prime. 

 

SM_6465178_0-1701998442644.png

I was guessing that it had something to do with the unit which is Newtons, which I added in, but it still doesn't work. Any advise on where this is going wrong?

Best answer by Werner_E

You definitely would have to post the worksheet.

Your screenshot does not show which error message is thrown (I assume its about a unit mismatch) and we cannot trace the error in pic to see where exactly in the program the error occurs.

Furthermore we don't see the definition of the variable "int"  -  it should be something with unit m^2/s^2

We also don't see how the function "near" is working, though I guess it has nothing to do with a unit mismatch.

 

So my best guess just from the pic is that "int" may have the wrong unit,

 

In case this is not the case, you'll have to post the worksheet and it may help if you post the working MC15 sheet as well.

2 replies

Werner_E25-Diamond IAnswer
25-Diamond I
December 8, 2023

You definitely would have to post the worksheet.

Your screenshot does not show which error message is thrown (I assume its about a unit mismatch) and we cannot trace the error in pic to see where exactly in the program the error occurs.

Furthermore we don't see the definition of the variable "int"  -  it should be something with unit m^2/s^2

We also don't see how the function "near" is working, though I guess it has nothing to do with a unit mismatch.

 

So my best guess just from the pic is that "int" may have the wrong unit,

 

In case this is not the case, you'll have to post the worksheet and it may help if you post the working MC15 sheet as well.

25-Diamond I
December 8, 2023

You closed the thread - so what exactly was the problem?

10-Marble
December 8, 2023
I didn't mean to not sure why it closed

25-Diamond I
December 8, 2023

You marked my answer as accepted solution which usually means that the question is answered and the problem is solved.
So I was curious as to what the problem in your case was - was it the units of the variable "int" as I guessed?