Main Content

close

Close file after writing video data

Syntax

Description

close(v) closes the video file associated with v. You must call close to ensure that all data is written to the file. The object, v, remains in the workspace. If you call the open function after closing the video file, open discards all existing contents of the file.

example

Examples

collapse all

Create a VideoWriter object to write a new Motion JPEG AVI file.

v = VideoWriter('newfile');

Open the file for writing.

open(v)

Write a 300-by-300 matrix of data to the file.

writeVideo(v,rand(300))

Close the file.

close(v)

Input Arguments

collapse all

Input VideoWriter object. Use VideoWriter to create the object.

Version History

Introduced in R2010b