This is machine translation

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

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


Save image acquisition objects to MAT-file


save filename
save filename obj1 obj2 ...


save filename saves all variables in the MATLAB® workspace to the MAT-file filename. If filename does not include a file extension, save appends the .MAT extension to the filename.

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

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 the getdata function), and then save the variable to the MAT-file.

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


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

See Also

| |

Introduced before R2006a

Was this topic helpful?