LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FOR Loop: Case Structure/Different Conditions for Respective Iterations

Solved!
Go to solution

I am tasked to create a program that executes a particular mathematical operation on an inputted number (Q) for each index of a particular array. For instance, since i is 0, the program is to show in the first index the square of the inputted number (Q^2). For the next iteration, the second index is this input multiplied by 5, for instance. If this program were to only repeat twice, then the finished array would look something like this (say, if = 10): 

 

100

50

 

I know how to set up a case structure with a comparison equality operator for one iteration but I am honestly lost on what to add to the program to satisfy = 1, 2, 3 and so on. I attached a screenshot of what I have so far. Any help would be greatly appreciated! 

0 Kudos
Message 1 of 4
(1,039 Views)
Solution
Accepted by topic author theconfuddledstudent

Wire i to the selector terminal of the case structure.

Message 2 of 4
(1,013 Views)

Great. I think I figured that part out. How do I program it so that on the front panel there is an array of numbers produced by this program rather than one indicator displaying all of the results? 

0 Kudos
Message 3 of 4
(975 Views)

Scratch that, I think I have it figured out. 

0 Kudos
Message 4 of 4
(970 Views)