Main Content

save

Save image acquisition objects to MAT-file

Syntax

save filename
save filename obj1 obj2 ...
save(filename,obj1,obj2,...)

Description

save filenamesaves all variables in the MATLAB®workspace to the MAT-filefilename. Iffilenamedoes not include a file extension,saveappends the.MATextension to the filename.

save filename obj1 obj2 ...saves the specified image acquisition objects (obj1,obj2, etc.) to the MAT-filefilename.

save(filename,obj1,obj2,...)is the functional form of the command, where the file name and image acquisition objects must be specified as character vectors. If no objects are specified, then all variables existing in the MATLAB workspace are saved.

Note that any data associated with the image acquisition object is not stored in the MAT-file. To save the data, bring it into the MATLAB workspace (using thegetdatafunction), and then save the variable to the MAT-file.

To return variables from the MAT-file to the MATLAB workspace, use theloadcommand. Values for read-only properties are restored to their default values upon loading. For example, theRunningproperty is restored to'off'. Use thepropinfofunction to determine if a property is read only.

Examples

obj = videoinput('winvideo', 1); obj.SelectedSourceName = 'input1' save fname obj obj.TriggerFcn = {'mycallback', 5}; save('fname1', 'obj')

Version History

Introduced before R2006a