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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Problem with programming in Mathcad Prime 2.0

ptc-4735426
1-Newbie

Problem with programming in Mathcad Prime 2.0

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

8 REPLIES 8

You have h as Stefan–Boltzmann const:

SB.png

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

You welcome!

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

Chek it please!

If I give h a value then it won't loop. The program just computes the one value of h.

Thanks for all your help!

Alex Milne wrote:

If I give h a value then it won't loop. The program just computes the one value of h.

I think You give not correct value.

Check it please!

Capture.JPG

http://t0.gstatic.com/images?q=tbn:ANd9GcRKejxEJNTg4DyeYlnDvds3Km44NJaFBqomJckLCW_B-ZXCevMAYg

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

Top Tags