vssSetOutputData

Set block's signal output.

Syntax

vssSetOutputData(block,varidx,out,datatype)

Inputs

block
Handle of the block used in the evaluation, compilation and simulation phases. The handle refers to an engine/core block structure.
Type: block
Dimension: -
varidx
Variable index according to the port number.
Type: integer
Dimension: scalar
out
Output variable.
Type: double | integer | log | complex
Dimension: scalar | Boolean | vector | matrix
datatype
Datatype of the output. 1 is scalar or matrix, 2 complex and 9 is boolean.
Type: integer
Dimension: scalar

Example

Set Position variable as the output data of the first port of an OML custom block, with the same datatype as the one from the first output port.

function OmlBlockFunction(block,flag)
   ...
   vssSetOutputData(block,1,Position,vssGetOutputDataType(block,1));
end