odd even numbers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
odd even numbers
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.
- Labels:
-
Other
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 = ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Werner so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here are three more equivalent functions, all based on the same principle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot Werner !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Nice appraoch, but you you have to replace TC_Panels by the argument tc in the routine.
You may also make it more compact:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Fred! i like your approach too.
