Main Content

createVideo

Create video of BatterySimulationChart object

Since R2023b

Description

createVideo(chart) writes video data from a BatterySimulationChart object to an AVI file.

createVideo(chart,filename) writes video data from a BatterySimulationChart object to an AVI file named filename.

example

createVideo(___,Name=Value) specifies additional video options such as the start time, the end time, the frame rate, and the playback speed, using one or more name-value arguments. Specify the name-value arguments after all the arguments in any of the previous syntaxes.

Examples

collapse all

Follow the steps in Visualize Dynamic Module Object Based on Cell Temperature to create a BatterySimulationChart object that dynamically displays the temperature of a Module object.

Create a video file of the BatterySimulationChart object. Assign this file a meaningful name and set the playback speed to 10.

createVideo(moduleChart,"BatterySimulationChart_Temperature_Video",PlaybackSpeed=10)

Input Arguments

collapse all

Dynamic visualization of the time-series data of a variable that you store inside a BatterySimulationLog object, specified as a BatterySimulationChart object.

Name of the video file, specified as a character vector or string scalar. If you do not specify a name, createVideo uses the name of the battery object associated to the BatterySimulationLog object of the BatterySimulationChart object.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: PlaybackSpeed=10

Time of the simulation at which the video starts.

Time of the simulation at which the video ends.

Playback speed of the video. The value of this argument affects how fast or slow the video plays.

The createVideo function updates the video by using this equation:

(1/FrameRate)*PlaybackSpeed

For example, if you set PlaybackSpeed to 100 and FrameRate to 1, the video updates once every 100 seconds of simulation time.

Rate of video playback in frames per second, specified as a positive number.

The createVideo function updates the video by using this equation:

(1/FrameRate)*PlaybackSpeed

For example, if you set PlaybackSpeed to 100 and FrameRate to 1, the video updates once every 100 seconds of simulation time.

Version History

Introduced in R2023b