NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Posts: 26
0 Kudos

Saving initial values (values from first iteration) of a 4-element 1D array so i can use them for arithmetic operations for values from succeeding iterations

Im trying to save/put in memory the first iteration values of a 4-element 1D array and use them to do arithmetic operations on the initial and succeeding values of the same array.

 

Here's what i'm trying to do:

 

Let's say the first iteration results to an array with values (2, 4, 6, 8)

Second iteration values = (4, 8, 12, 16)

Third iteration values = (6, 12, 24, 48)

 

The resulting array will display:

1st iteration = (2, 4, 6, 8) divided by (2, 4, 6, 8) = (1, 1, 1, 1)

2nd iteration= (4, 8, 12, 16) divided by (2, 4, 6, 8) = (2, 2, 2, 2)

3rd iteration = (6, 12, 24, 48) divided by (2, 4, 6, 8) = (3, 3, 4, 6)

Any help would be appreciated and Thanks in advance!

Member
cjlandry
Posts: 41
0 Kudos

Re: Saving initial values (values from first iteration) of a 4-element 1D array so i can use them for arithmetic operations for values from succeeding iterations

I just finished writing a VI that does something very similar.  The new array changes everytime the VI is accesed.  It compares the previous array to the new array and calculates values. Ignore my label for the output array.  It could be misleading.  The output array is the result from my calculation. The first time through it compares the new array to a default value, then each successive time the new array is compared to the previous array that was run the last time through.  Hope this makes sense.  See attached.

 

Member
Posts: 26
0 Kudos

Re: Saving initial values (values from first iteration) of a 4-element 1D array so i can use them for arithmetic operations for values from succeeding iterations

sorry but my version of Labview is 8.0
Trusted Enthusiast
tbob
Posts: 4,067
0 Kudos

Re: Saving initial values (values from first iteration) of a 4-element 1D array so i can use them for arithmetic operations for values from succeeding iterations

This question is similar to this one
- tbob

Inventor of the WORM Global
Member
cjlandry
Posts: 41
0 Kudos

Re: Saving initial values (values from first iteration) of a 4-element 1D array so i can use them for arithmetic operations for values from succeeding iterations

I've attached a JPG of the block diag.

 

 

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page