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: 

Reduca 2D array

Hi there !

I have to display a 640 by 480 matrix using a 3D surface. But the memory used by labview jumps up pretty high and the Vi gets unusable. So I was thinking of reducing the array to an half making it easier to manage. My idea is to use the decimate 1D in a FOR loop taking every 2n lines. It doesn't work and i don't understand why..

 

I also use CWGraph3D method but it doesn't display it correctly.

Can you guys see my mistake ? Or maybe you know a better method to handle the data ?

 reduce 2d array.jpg

Thanks !

 

0 Kudos
Message 1 of 6
(2,303 Views)

This might not be the best way, but it is one way.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 2 of 6
(2,297 Views)

WHy are you writing to a local variable, then reading from the terminal (Hauteur). There is no guarantee that the local is written before the terminal is read, it could be the otehr way around. Why not wire 480 directly ald delete the terminal and local variable??

 

What is the meaning of "it does not work"? Can you be more specific?

 

"Delete from Array" is the incorrect tool to slice out a row or column. Use "index array" with one index unwired.

 

If you cannot get it to work, attach your VI containing typical data.

0 Kudos
Message 3 of 6
(2,295 Views)

try something like this...

 

(Modify as needed)

 

Download All
0 Kudos
Message 4 of 6
(2,290 Views)

Eh thanks for the quick answers !

@altenbach: That look exactly like what I'm looking for. I forgot to specify it but I'm using Labview 9.0.1 I'll try to adapt from the picture anyway but that

would be nice if you could save it as an old version 🙂

The reason of the control is because I might have to change the resolution later so I was trying to make it adaptable. The presence of the local variable is a mistake. I tried with a sequence before and forgot to delete it..

 

@Even DJ: Same thing, can't open it because of older version of Labview

0 Kudos
Message 5 of 6
(2,283 Views)

Here is Altenbach's Vi. It's better than mine.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 6 of 6
(2,280 Views)