Contenido principal

createVideo

Create video of battery simulation chart

Since R2023b

Description

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

createVideo(chart,filename) writes video data to an AVI file named filename.

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

example

Examples

collapse all

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

Create a video file of the BatterySimulationChart object. Assign the file a name and set PlaybackSpeed to 1.

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

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 with the BatterySimulationLog object of the BatterySimulationChart object.

Name-Value Arguments

collapse all

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

Start time of the video, specified as a nonnegative number.

End time of the video, specified as a nonnegative number.

Playback speed of the video, specified as a positive number. 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.

Note

Increasing the value of the FrameRate argument results in smoother color transitions for the logged variable in the exported video. However, exporting the video might take a longer time.

Since R2026a

Video quality, specified as an integer in the range [0,100]. Specifying a higher value for the Quality argument produces videos with higher visual quality and larger file sizes. Conversely, specifying a lower value for this argument results in videos with reduced visual quality and smaller file sizes.

Version History

Introduced in R2023b

expand all