Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hello,
my question is inside the mathcad sheet. it is about when the value is odd to return a certain value, and when it is even to return a different value. Thanks!
Solved! Go to Solution.
You are making a mistake in thinking that in the odd case you will just get 2,6,,10, etc. Thats simply not true - Ceil will yield any multiples of 2 and because N=4 and 4 IS a multiple of 2 you get N=4.
Okay, If Npanels = 4 and TC = 18, you want Nf = 6.
Give us a few other examples:
Npanels = 4, TC = 17, Nf = ??
Npanels = 4, TC = 10, Nf = ??
Npanels = 4, TC = 7, Nf = ??
Interesting part would be different values of Npanels, as TC=17 and TC=7 sure should yield the same result (given the same Np).
Maybe something like this
TC will always be an even number, but the divsion by 2 can be either odd or even. i have added more clarification in the attached sheet. Please let me know if you need more explanation. Thanks to you all!
Thank you Werner so much!
Here are three more equivalent functions, all based on the same principle
Thanks a lot Werner !
Nice appraoch, but you you have to replace TC_Panels by the argument tc in the routine.
You may also make it more compact:
Thank you Fred! i like your approach too.