Main Content

Using Tab Completion for Functions

To get a list of options you can use on the function, press the Tab button after entering a function on the command line. The list expands and you can scroll to choose a property or value. For example, when you create the videoinput object, you can get a list of supported formats:

v = videoinput('winvideo',1, 

When you press Tab after the Device ID (1 in this example), the list of formats displays, as shown here.

If you pressed Tab just after the first parentheses, a list of available adaptors would appear. The format for the object constructor function is:

v = videoinput('adaptorName',deviceID,'VideoFormat') 

When you press Tab where a field should appear, you get the list of options for that field.

You can also get the values for property-value pairs, which can be used on the videoinput function after the first three required fields. For example,

v = videoinput('winvideo',1,'RGB1024x768','LoggingMode', 

Press Tab after typing LoggingMode to get the possible values for that property, which are 'memory', 'disk', and 'disk&memory'.

Many of the other toolbox functions also have tab completion. For example, when using the getdata function you can specify the data type using tab completion.

data = getdata(obj,10, 

Press Tab after typing the number of frames (10 in this example) to get the possible values for the data types, such as 'uint8' or 'double', since data type is the next input getdata takes after number of frames.