%% Identifying Available Devices
%
% Copyright 2001-2012 The MathWorks, Inc.

%% Identifying Installed Adaptors
% This example shows how to identify the available devices on your system and obtain device information.
%
% The |imaqhwinfo| function provides a structure with an
% |InstalledAdaptors| field that lists all adaptors on the current system 
% that the toolbox can access.
imaqInfo = imaqhwinfo

%%
imaqInfo.InstalledAdaptors

%% Obtaining Device Information
% Calling |imaqhwinfo| with an adaptor name returns a structure that provides
% information on all accessible image acquisition devices.
hwInfo = imaqhwinfo('winvideo')

%%
hwInfo.DeviceInfo

%%
% Information on a specific device can be obtained by simply indexing into 
% the device information structure array.
device1 = hwInfo.DeviceInfo(1)

%%
% The |DeviceName| field contains the image acquisition device name.
device1.DeviceName

%%
% The |DeviceID| field contains the image acquisition device identifier.
device1.DeviceID

%%
% The |DefaultFormat| field contains the image acquisition device's default 
% video format.
device1.DefaultFormat

%%
% The |SupportedFormats| field contains a cell array of all valid video 
% formats supported by the image acquisition device.
device1.SupportedFormats
