plotPulse
R2026bSyntax
Description
plotPulse(
plots the measured voltage over time for the pulse index myHppcTest,pulseIndices)pulseIndices.
The indices refer to the tabulated pulses in the TestSummary property
table of the HPPCTest object, myHppcTest.
plotPulse(
plots the measured voltage over time for the pulse index myHppcTest,pulseIndices,Name=Value)pulseIndices
and specifies options using one or more name-value arguments.
returns a
chart = plotPulse(___)VoltageVerificationChart object.
Examples
This example shows how to plot the measured voltage for a pulse at a specific index inside a hybrid pulse power characterization (HPPC) test data.
Open the DownloadBatteryData example and load the required HPPC
data obtained for a BAK 2.9 Ah battery cell at 25 °C. This data consists of a table with
three columns. The columns of the table refer to time, voltage, and current values,
respectively.
openExample("simscapebattery/DownloadBatteryDataExample") load("testDataBAKcells/hppcDataBAKcell25degC.mat")
Store the HPPC data inside an HPPCTest object by using the hppcTest function. You can use this object
to view the data, add or edit breakpoints, add or remove pulses, and include additional
information such as state of charge and capacity. The HPPC data is a table, so you must
also specify each column name by using the TimeVariable,
VoltageVariable, and CurrentVariable arguments.
These names must match the names of the columns in the hppcData
table.
hppcExp = hppcTest(hppcData,... TimeVariable="time (s)",... VoltageVariable="voltage (V)",... CurrentVariable="current (A)");
Analyze the TestSummary property of the
hppcExp object. This property contains a summary of the HPPC test
that shows all the identified pulses and related data, returned as a table.
hppcExp.TestSummary
ans =
18×13 table
PulseID Directionality SOC HPPCData PulseDuration PseudoOCV_V MaximumVoltage MinimumVoltage Current_A C_rate PulseStartIndex PulseEndIndex Temperature_degC
_______ ______________ _______ _________________ _____________ ___________ ______________ ______________ _________ ______ _______________ _____________ ________________
1 "Discharge" 1 {701×6 timetable} 30 4.1745 4.1745 3.7846 -6.1869 1.8976 354 1055 25
2 "Discharge" 0.90376 {701×6 timetable} 30 4.0837 4.0837 3.7479 -6.187 1.8977 2702 3403 25
3 "Discharge" 0.80754 {702×6 timetable} 30 4.0132 4.0132 3.6652 -6.1867 1.8975 5049 5751 25
4 "Discharge" 0.71133 {701×6 timetable} 30 3.9226 3.9226 3.5775 -6.1868 1.8976 7398 8099 25
5 "Discharge" 0.61512 {701×6 timetable} 30 3.846 3.846 3.4942 -6.1868 1.8976 9746 10447 25
6 "Discharge" 0.51891 {701×6 timetable} 30 3.7353 3.7353 3.4001 -6.1871 1.8977 12094 12795 25
7 "Discharge" 0.4227 {701×6 timetable} 30 3.65 3.65 3.3236 -6.1867 1.8975 14442 15143 25
8 "Discharge" 0.32649 {701×6 timetable} 30 3.6015 3.6015 3.2652 -6.1869 1.8976 16790 17491 25
9 "Discharge" 0.23028 {701×6 timetable} 30 3.5507 3.5507 3.1931 -6.1869 1.8976 19138 19839 25
10 "Charge" 0.98415 {502×6 timetable} 10 4.1158 4.3889 4.1158 4.6393 1.423 1055 1557 25
11 "Charge" 0.88793 {502×6 timetable} 10 4.057 4.3001 4.057 4.6406 1.4233 3403 3905 25
12 "Charge" 0.79172 {502×6 timetable} 10 3.9674 4.2113 3.9674 4.6394 1.423 5751 6253 25
13 "Charge" 0.69551 {502×6 timetable} 10 3.8751 4.1175 3.8751 4.6396 1.423 8099 8601 25
14 "Charge" 0.5993 {502×6 timetable} 10 3.7905 4.0355 3.7905 4.6396 1.423 10447 10949 25
15 "Charge" 0.50309 {502×6 timetable} 10 3.6936 3.9339 3.6936 4.6405 1.4233 12795 13297 25
16 "Charge" 0.40688 {502×6 timetable} 10 3.6224 3.8602 3.6224 4.6396 1.423 15143 15645 25
17 "Charge" 0.31066 {502×6 timetable} 10 3.5695 3.8109 3.5695 4.6397 1.4231 17491 17993 25
18 "Charge" 0.21445 {502×6 timetable} 10 3.5098 3.7597 3.5098 4.6397 1.4231 19839 20341 25 Plot the data of the sixth pulse using the plotPulse function.
The plot shows the measured voltage of the sixth pulse in the
TestSummary property table of the hppcExp
object.
plotPulse(hppcExp,6)

Input Arguments
HPPC test container to plot, specified as an HPPCTest object.
Indices of the tabulated pulses inside the TestSummary property
table of the HPPCTest object, specified as a scalar or vector. Specify
this argument as a vector to visualize multiple pulses at once inside a grid
layout.
Data Types: double
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: plot(myTest,SimulatedVoltageVisible="on")
Visibility of the simulation voltage, specified as
"off", "on", or as numeric or
logical 1 (true) or 0
(false). A value of "on" is
equivalent to true, and "off" is
equivalent to false. Thus, you can use the value of this
property as a logical value. The value is stored as an on/off logical value of type
matlab.lang.OnOffSwitchState.
Visibility of the chart axes, specified as "off",
"on", or as numeric or logical 1
(true) or 0
(false). A value of "on" is
equivalent to true, and "off" is
equivalent to false. Thus, you can use the value of this
property as a logical value. The value is stored as an on/off logical value of type
matlab.lang.OnOffSwitchState.
Since R2026b
Visibility of chart axes toolbar, specified as "on" or "off", or as numeric or logical 1 (true) or 0 (false). A value of "on" is equivalent to true, and "off" is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.
"on"— Display the toolbar."off"— Do not display the toolbar.
The plot function also accepts all properties of the ChartContainer class
as name-value arguments. For a list of these properties, see matlab.graphics.chartcontainer.ChartContainer.
Output Arguments
Chart for visualizing the measured and simulated voltage of pulses, returned as a
VoltageVerificationChart object.
Version History
Introduced in R2025aYou can manage the visibility of the chart axes toolbar by specifying the
ToolbarVisible argument to "on" or
"off".
See Also
hppcTest | updateTestSummary | setDischargeSOCs | setChargeSOCs | removePulse | addPulseData | plot
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)