Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

UserData

Data you want to associate with a serial port object

Description

You configure UserData to store data that you want to associate with a serial port object. The object does not use this data directly, but you can access it using the get function or the dot notation.

Characteristics

Read only

Never

Data type

Any type

Values

The default value is an empty vector.

Example

Suppose you create the serial port object associated with the serial port COM1.

s = serial('COM1');

You can associate data with s by storing it in UserData.

coeff.a = 1.0;
coeff.b = -1.25;
s.UserData = coeff;
Was this topic helpful?