Main Content

seriallist

(To be removed) List of serial ports connected to your system

seriallist is not recommended. Use serialportlist instead. For more information on updating your code, see Version History.

Description

seriallist returns a list of all serial ports on a system. The list includes virtual serial ports provided by USB-to-serial devices and Bluetooth Serial Port Profile devices. This provides a list of the serial ports that you have access to on your computer and could use for serial port communication.

example

Examples

collapse all

The seriallist function displays a list of all serial ports on a system.

Display available serial ports.

seriallist
ans = 

  1x2 string array

  "COM1"    "COM3"

You can now create a serial object and communicate over the serial port.

Version History

Introduced in R2017a

expand all

R2022a: Warns

seriallist is not recommended. Use serialportlist instead.

This example shows how to view serial port devices using the recommended functionality.

FunctionalityUse This Instead
s = seriallist
ans = 

    "COM3"
s = serialportlist
ans = 

    "COM3"

See Transition Your Code to serialport Interface for more information about using the recommended functionality.

See Also

Functions