Skip to main content
1-Visitor
October 18, 2012
Solved

Problem with programming in Mathcad Prime 2.0

  • October 18, 2012
  • 8 replies
  • 4541 views

Hello,

I'm having trouble programming a while loop for to determine the optimal height in a beam deflection problem for school. I keep getting the error, "These units are not compatible," but if I remove all of the units I get the error, "This expression is divided by zero. It cannot be computed."

Attached is the program I am working with.

Thanks

Best answer by AndyWesterman

Hi Alex,

I think that you may have a problem with the logic of the while condition.

Capture.PNG

Capture2.PNG

For the i=1 initial condition, the first condition is true, but the second is not and therefore the while loop does not execute.

Hope this helps

Regards

Andy

8 replies

24-Ruby IV
October 18, 2012

You have h as Stefan–Boltzmann const:

SB.png

1-Visitor
October 18, 2012

If I change h to ht the same error message still appears.

24-Ruby IV
October 18, 2012

You welcome!

Tha variable h must have a correct value before start the loop.

Chek it please!