01-10-2017 04:52 PM - edited 01-10-2017 04:53 PM
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
01-11-2017 01:28 PM
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?
01-12-2017 08:59 AM
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.
01-12-2017 12:35 PM
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