DIAdem Help

Command: ArrayToChannels

  • Updated2024-09-12
  • 3 minute(s) read

Display all  Hide all

Command: ArrayToChannels

Converts an array into channels.

ReturnValue = ArrayToChannels(SrcVariant, ChannelNames, [OverWriteMode], [TransposeMatrix])

Input Parameters

SrcVariant Specifies the name of the variant that DIAdem converts into channels.
ChannelNames Specifies the names of the channels.
[OverWriteMode] Specifies whether DIAdem overwrites the values or appends the values. The default value is FALSE, which means that DIAdem appends the values.
[TransposeMatrix] Specifies whether DIAdem transposes the matrix, which means DIAdem exchanges the rows and columns. The default value is FALSE which means that DIAdem does not swap the rows and columns.

Return Parameters

ReturnValue Specifies a channel list as a vector in the script environment. The return value is a ChannelList type.
Note  You must return the channel names as an array.
Note  DIAdem tries to automatically specify the data type of new channels from the values of the array to be converted.

Example

The following example generates a matrix with the x-values and the y-values of the sine function and converts the matrix into channels.

VBScriptPython

 

Dim MyArray(1,10000), MyChannels(1), I
For I = 0 to 10000
  MyArray(0,I)=2*Pi*I/10000
  MyArray(1,I)=Sin(2*Pi*I/10000)
Next
MyChannels(0)="X Channel"
MyChannels(1)="Sin Channel"
Call ArrayToChannels(MyArray, MyChannels)

Related Topics

Command: ChannelsToArray | Command: ValueToChn

Log in to get a better experience