Command: ArrayToChannels
- Updated2024-09-12
- 3 minute(s) read
Command: ArrayToChannels
Command: ArrayToChannels
Converts an array into channels.
Input Parameters
![]() |
Specifies the name of the variant that DIAdem converts into channels. |
![]() |
Specifies the names of the channels. |
![]() |
Specifies whether DIAdem overwrites the values or appends the values. The default value is FALSE, which means that DIAdem appends the values. |
![]() |
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
![]() |
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.
VBScript | Python |
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)