ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiplying array elements with their indexes

Solved!
Go to solution

How can I multiply array elements with their index values.

 

Thanks in advance.

0 Kudos
Message 1 of 10
(5,039 Views)
Solution
Accepted by aksoy

Hi aksoy,

 

multiply the elements with their index:

check.png

Best regards,
GerdW


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

A slightly modified version

 

Multiply-array.png

 

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 10
(5,031 Views)

Thanks GerdW,

 

Now I have two arrays. One contains the measurement values and the other has the time for each point. How can I combine these two to have dynamic data with time. Therefore I can filter, graph or write data to a file with time values.

 

Best regards,

 

Aksoy

0 Kudos
Message 4 of 10
(5,023 Views)

Hi aksoy,

 

when your data samples are evenly spaced in time you could use a waveform.

 

But as a generic answer to your generic question I would tend to "stick with your two arrays"!

- You can easily plot them using an XY graph.

- You can easily save them using WriteToSpreadsheetFile.

- You can easily filter them depening on your time array.

- You can easily attach new samples to each array.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(5,018 Views)

You can use the build waveform function to achieve this.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 10
(5,015 Views)

Thanks All,

 

How can I convert double 2D array to waveform to generate a waveform with time values?

0 Kudos
Message 7 of 10
(5,004 Views)

Hi aksoy,

 

you can't (easily) convert from 2D array to waveform.

 

As I mentioned before: when your samples are evenly spaced in time you might convert to a waveform: A waveform consists of start time t0, sample time dt and sample values Y. No need for an additional array with time values here...

 

If this doesn't apply: stick with two arrays!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 10
(5,000 Views)

Dear GerdW,

 

I think more or less my problem is clear. I have 2D array with data values. I need it with time values attached to it. Therefore I can play on it easily. Thus I am a new bei in labview. Any suggestions is wellcome.

 

 

Best Regards,

 

Aksoy

0 Kudos
Message 9 of 10
(4,994 Views)

Hi Aksoy,

 

given your description I can't give other suggestions as I already did...

Best regards,
GerdW


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