Name

InPort_read — Read Data From InPort.

Calling Sequence

data=InPort_read(port, sz)

Parameters

port

Handle value of Outport.

sz

vector. size of matrix to be read.

data

vector.

Description

This function read user's data from InPort.

Matrix data is written in the order as follows:

    Sequence                                                Matrix
                                                            |1  4  7|
                                                            |2  5  8|
    [1 2 3 4 5 6 7 8 9]  ----------- DataOutPort ---------- |3  6  9|
    

Examples

      initRTM("Scilab");
      rtc =  RTC_create();

      port = RTC_registerInPort(rtc, "TimedDoubleSeq", "in0");
      if InPort_poll(port) then,
        sz = [3 3];
        data =  InPort_read(port, sz);
      end; 

See Also

Authors

Yuki Suga (ysuga.net)