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: 

updating a matrix after each iteration of a for loop adn simultaneously storing results in new matrices

I have data from an X-matrix and a y-matrix going into a for loop, in which various operations are carried out. I want to be able to update these matrices after each iteration of the loop for N number of counts, and at the same time store results of each iteration in new matrices. I am new to labview and will appreciate all the help. Thanks you.
0 Kudos
Message 1 of 4
(2,743 Views)
I assume you are talking about arrays. As you operate on the values, they are necessarily updated. If you want to hand over the current values to the next iteration, use shift registers.
If I understand you correctly, you als want an output array with one more dimesion (size=n, one for each iteration), so you see the history of the calculation. Simply feed a branch to the right edge of the loop and make the tunnel auto-indexing.

Once the loop finishes, the output of the shift register will have the completely updated array, while the output of the indexing tunnel contains the full calculation history.


It would be useful if you could add a few more sentences on exactly what you want to do. What are the array dimensions?
0 Kudos
Message 2 of 4
(2,743 Views)
I put together a simple VI in LabVIEW 6i to explain in better detail the earlier post. It should show you how to display your data while the For Loop is iterating, as well as how to access the data after the For Loop. Hope this helps!

Jim Cahow
Applications Engineer
National Instruments
Message 3 of 4
(2,743 Views)
Dear Jim, I appreciate your help with these that very basic questions. Thank you very much that really helped.
0 Kudos
Message 4 of 4
(2,743 Views)