LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

updating a matrix after each iteration of a for loop

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 build new matrices with the results of each iteration. I am new to labview and will appreciate all the help I can get. Thank you.
By the way...has anyone programmed a partial least squares algorithm in labview?
0 Kudos
Message 1 of 4
(2,783 Views)
Hi RVR,
From your For loop right click on the left or right edge of the frame and
select "Add Shift Register", then two arrows appear on the left and right
side of the frame. What this means is that the right arrow will accept data
(any kind) and the left arrow will release the data when the next iteration
comes along. Hence you can update your data after matrix X, you do the same
thing for matrix Y. Particularly, shift register should have initial data,
this can be done by connecting some initial data to the left arrow from out
side of the For loop.
Hope this solves your problem 🙂

Louis.

RVR wrote in message
news:50650000000800000020500000-1023576873000@exchange.ni.com...
> I have data from an X-matrix and a y-matrix going into a for loop, in
> wh
ich 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 build new matrices with the results of
> each iteration. I am new to labview and will appreciate all the help I
> can get. Thank you.
> By the way...has anyone programmed a partial least squares algorithm
> in labview?
0 Kudos
Message 2 of 4
(2,783 Views)
thank you. I know these are basic questions and I appreciate your help very much.
0 Kudos
Message 4 of 4
(2,783 Views)
RVR,
You might find the following link helpful as you try to program your least squares algorithm. This is an example program that uses LabVIEW's built in Least Square Polynomial Curve Fitting VI. Hope this helps!

Jim Cahow
Applications Engineer
National Instruments

http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/a084da81c66bb6fe8625696d00447981?OpenDocument
0 Kudos
Message 3 of 4
(2,783 Views)