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: 

Averaging 3D array into 1D array.

Solved!
Go to solution

Hi,

I have a 3D array containing XY points of several loops and i am trying to average the data points of my array into a 1D array that should contain 1Loop with XY points. Can someone help me out?

 

Thanks 

 

Mutah

******************

Qui ose vaincra.

0 Kudos
Message 1 of 7
(2,585 Views)

Hi Mutah,

 

can you please add a small VI with some sample data to illustrate your problem?

What is an array containing "1Loop"?

How do you want "XY points" to be represented in the resulting array?

What du you understand by "XY points"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,580 Views)

Hi GerdW,

 

Enclosed is the small v.i.

The idea is to average data points of the X axis and data points from the Y axis and have a final loop.

With the v.i, you need to change the sampling rate, the frequency and the amplitude to see a loop.

Hope this makes it a little bit more clear..

 

Mutah

0 Kudos
Message 3 of 7
(2,566 Views)

Hi Mutah,

 

it really doesn't help so much...

There is no 3D array in your VI, just two 2D arrays. You also don't mention what to average in those arrays: rows, columns, or something completely different?

Also: what do you mean by "loop" ("see a loop", "final loop")? Do you mean FOR loops, WHILE loops? Or rows/columns of an array?

 

At least a small hint in the attachment...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(2,563 Views)

Hi GerdW,

 

The sine signal generator gives an array of X0.....Xn data points.

The triangle signal simulator gives an array of Y0...Yn data points. so what i am trying to do is plot the two signals 

and they come out on the XY graph as a loop( the loop being the figure on the XY graph).

My point is that i can generate multiple Loops of X0....Xn and Y0...Yn data points by changing the sampling rate. so i would like to be able

to average the sum of loops generated by the signal generators.

so, i would have an array of 2D data for my final loop.

 

Thanks!!

 

Mutah

0 Kudos
Message 5 of 7
(2,556 Views)
Solution
Accepted by topic author Mutah

Hi Mutah,

 

so a "loop" is your equivalent for plot...

 

See attachment...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(2,552 Views)

Hi GerdW,

 

You got the right thing!!

It is doing the right thing!

Thanks a lot!

 

Mutah

0 Kudos
Message 7 of 7
(2,549 Views)