From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help outputting array

hello, I am completely new to labVIEW. We just started learning simple functions in class. One exercise is to output an 3x3 array of : 2, 4, 6 8, 10, 12 14, 16, 18 It must be done specifically by using nested for loop and formula node, and actually logically computed instead of just storing the inputs. I am able to output a 3x3 but can’t figure out formula or what to do with formula node for desired output values. Any help appreciated, thanks!!
0 Kudos
Message 1 of 5
(1,243 Views)

Hello kitoskeris4,

 

I Guess this is a home work application, Just try the basics and Share the one which you have tried to reach the solution, so that others can guide you to reach the final output.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 5
(1,240 Views)

The top of the forum has many links to training resources. Once you completed them and there are remaining questions, please ask more specific questions. I assume the topic has also been covered in class. Have a look at your class notes.

 

What schools is this and what kind of qualifications does your teacher have? Asking to use a "formula node" is highly unusual. You don't need nested FOR loops, you can reshape at the end. Also the term "logically computed" is a bit weird. Logic typically involves booleans, not numerics, but it can be colloquially used for both.

0 Kudos
Message 3 of 5
(1,225 Views)

@kitoskeris4 wrote:
One exercise is to output an 3x3 array of : 2, 4, 6 8, 10, 12 14, 16, 18 It must be done specifically by using nested for loop and formula node, 

As I said, nested FOR loops and formula nodes are not needed, but since you have these unreasonable requirements, the following is not a valid solution. Still, it might give you some ideas.... 🙂 Try to recreate it from scratch.

 

altenbach_0-1600361569122.png

 

0 Kudos
Message 4 of 5
(1,213 Views)

@kitoskeris4 wrote:
 can’t figure out formula or what to do with formula node for desired output values. 

For the most generic case, your formula node is in the innermost loop and needs five inputs wired to it to produce one output element

 

  1. The size of the dimension (3 in your case)
  2. The iteration count (from the [i] terminal) of the outer FOR loop.
  3. The iteration could of the inner FOR loop.
  4. The step size between elements (2 in your case)
  5. The offset, i.e. the value of the first element (2 in your case).

This is very simple math. Try to solve it with paper&pencil first.

0 Kudos
Message 5 of 5
(1,206 Views)