Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

ArrayOperation functions equivalence

Hi,

 I was looking for some equivalence of the following functions that are in vb6 in the following control

CWAnalysisControlsLib.CWArray

-----------------------------------------------

Function Subset1D(x, Index, Length)

Function NegArray(x)

Function SubsetArray(InputArray, IndexArray)

Function IndexArray(InputArray, IndexArray)

Function ArrayDims(InputArray) As Long

Function Sort1D(x, Direction)

Function ArrayDimSizes(InputArray)

Sub ClearArray(x)

Function CopyArray(x)

Function Reverse1D(x)

-----------------------------------------------------------

I have not found any on these in the following namaspace NationalInstruments.Analysis.Math.ArrayOperation

My question is, Can I use the .NET Array Class for replacing them ?

 

Thanks in advance

0 Kudos
Message 1 of 4
(2,897 Views)

Hi,

 

Are you developping an application in Measurement Studio now and would like to have those functions? Which control are you currently using, since the CWAnalysisControlsLib.CWArray is not available in Measurement Studio?

T. Le
Vision Product Support Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,855 Views)

Hi thuyanhl,

Are you developping an application in Measurement Studio now and would like to have those functions?

Yes I am.

Which control are you currently using, since the CWAnalysisControlsLib.CWArray is not available in Measurement Studio?

Many functions that were in the CWAnalysisControlsLib.CWArray are now in the NationalInstruments.Analysis.Math.ArrayOperation class.I think operations with arrays like the functions I listed above we can achieve them using array class but I am not sure at all, because what I am doing is rewriting and application from vb6 to .NET.

0 Kudos
Message 3 of 4
(2,849 Views)

Hi,

 

Heres a sample of some code using the array operation functions.

Hope this helps.

 

double[,] data = daqMultiReader.ReadMultiSample(totalSamples);

//extract each channel by row
double[] data1 = new double[totalSamples];
double[] data2 = new double[totalSamples];

data1 = ArrayOperation.CopyRow(data, 0);
data2 = ArrayOperation.CopyRow(data, 1);

Curt

 

0 Kudos
Message 4 of 4
(2,844 Views)