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.
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.
12-18-2012 04:18 AM
Hello, I'm acquiring some data that comes into a string of numbers. I'd like to store them into a matrix in this way: for acquisition 1 -> data in column 1, acquisition 2->data in column 2 and so on...
I did the code attached simulating some data, but when I put them in the matrix, the new acquisition finishes in column 1 and the old one become a list of 0.
Any suggestion?
ps - I'm acquiring pixel values, so at the end I'd like a pixel matrix to reconstruct an image. every acquisition is a vertical line of the image.
12-18-2012 04:22 AM - edited 12-18-2012 04:31 AM
A matrix is a special datatype, mostly for linear algebra and other computations. You want to use a plain 2D array. Keep it in an initialized shift register and add a new row with each iteration using build array.
12-18-2012 04:24 AM
Thanks! I'll try that!
12-18-2012 04:29 AM - edited 12-18-2012 04:29 AM
Do you really need to see the imtermediary result? If the loops are fast, just autoindex on both loop to get a 2D array. Same final result.
12-18-2012 04:29 AM
Do you have some example?
12-18-2012 05:24 AM
Hem could you send me the .vi? Thaks!!!!
12-18-2012 05:59 AM
It just export the last values of the 2 for loops...
12-18-2012 06:12 AM
Check the attached vi. I recommend you to take LV basics and workout some example to get used to the primitives in LV.
12-18-2012 09:37 AM
Hi, could you tell me where is the error? thanks
12-18-2012 10:24 AM
@Elena_vsc wrote:
Hi, could you tell me where is the error? thanks
Your VI looks nothing like my example. I cannot really tell what the error is, because you are not telling us what kind of result you get and what kind of result you expect. Do you get an error message?