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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Loop with ranges

ELSID
4-Participant

Loop with ranges

Need help with a small program loop.
I am working with equations off of a manual.
Given 8 frequency bands, the first 3 frequencies have one if loop and the remaining 5 frequencies have an equation. Not sure if I need to use a range variable to solve for ATTN for f1-f3 and then use another range variable for f4-f8

Collabs help is greatly appreciated
3 REPLIES 3
StuartBruff
23-Emerald III
(To:ELSID)

On 9/23/2009 11:15:04 AM, ElSid wrote:
== Need help with a small program loop.
I am working with equations off of a manual.
Given 8 frequency bands, the first 3 frequencies have one if loop and the remaining 5 frequencies have an equation. Not sure if I need to use a range variable to solve for ATTN for f1-f3 and then use another range variable for f4-f8

See attached. One range variable should be sufficient, together with an additional if statement.


ELSID
4-Participant
(To:StuartBruff)

Thank you Stuart,
I found another work around but yours is much cleaner/elegant and I will use :).

I did forget to mention that this worksheet is set at Origin=1. I did not want to go back and change a 100 page monster and find the changes. This was before I learned my lesson of working with ORIGIN=0.

Make sure you never use again that vector format you had for 'fi', just a piece of crap. Don't use subindex unless you really have to in very long work. "if" terminates by "otherwise", always!!! Never use 'l' for variable name in TNR. For debugging, use TNR (or else) size 11, also make the * visible. Once finished, make your own taste, but always think in term that the helping collab shouldn't have to refabricate a work sheet before attempting to make it work !

jmG
Announcements

Top Tags