Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
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
Solved! Go to Solution.
Hi Alex,
I think that you may have a problem with the logic of the while condition.
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
You have h as Stefan–Boltzmann const:
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!
Hi Alex,
I think that you may have a problem with the logic of the while condition.
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