split
Syntax
Description
This function requires Extended Tire Features for Vehicle Dynamics Blockset.
Examples
Split Imported Tire Data
Use the split
function to split a tireData
object by each Fz
test condition into multiple tireData
objects using these input criteria options:
Data channel
Logical vector
Numeric vector
Import and View Tire Measurement Data
Import tire measurement data into a tireData
object, td
.
td = tireData("example_data.tdx");
Multiple Fz
conditions are included in this data file. Use the plot
function to view the normal force versus the elapsed time.
plot(td,DataVariableNames=["et","Fz"]);
Split tireData
Object Using Data Channels
Specify the normal force Fz
as the split criteria. The tireData
object is split into four tireData
objects at the locations where the nominal normal force value changes.
tdSplit = split(td,"Fz");
Plot the resulting tireData
objects in tdSplit
.
plot(tdSplit,DataVariableNames=["et","Fz"],ColorBy="Fz");
plot(tdSplit,DataVariableNames=["alpha","Fy"],ColorBy="Fz");
Split tireData
Object Using a Logical Vector
Specify a logical vector indicating true
values where changes in the normal force Fz
are greater than 500 N as the split criteria. The tireData
object is split into four tireData
objects at the positions where the value in the logical vector is true
.
tf = [0;diff(td.Fz) > 500]; tdSplit = split(td,tf);
Plot the resulting tireData
objects in tdSplit
.
plot(tdSplit,DataVariableNames=["alpha","Fy"],ColorBy="Fz");
Split tireData
Object Using Numeric Vector
Specify an integer array with the index values of the split location. The tireData
object is split into four tireData
objects.
idx = find(tf); tdSplit = split(td,idx);
Plot the resulting tireData
objects in tdSplit
.
plot(tdSplit,DataVariableNames=["alpha","Fy"],ColorBy="Fz");
Input Arguments
obj
— Tire data to split
tireData
object
The tire data to split, specified as a tireData
object.
criteria
— Criteria used to split tireData
object
logical vector | integer vector | string vector
Criteria used to split the tireData
object, specified as one of
these values:
Logical vector —
true
values indicate at which indices to split the tire data object.Integer vector — Integer values indicate at which indices to split the tire data object.
String vector — Changes in the segment, data channel, or time indicate where to split the
tireData
object using one or more of the string values listed in the table.Value Description "segment"
Splits the
tireData
object where thesegment
array has significant changes in values."et"
Splits the
tireData
object where the sampling frequency changes."Fz"
Splits the
tireData
object where theFz
data channel array has significant changes in values."IP"
Splits the
tireData
object where theIP
data channel array has significant changes in values."alpha"
Splits the
tireData
object where thealpha
data channel array has significant changes in values."gamma"
Splits the
tireData
object where thegamma
data channel array has significant changes in values."kappa"
Splits the
tireData
object where thekappa
data channel array has significant changes in values."Vx"
Splits the
tireData
object where theVx
data channel array has significant changes in values."V"
Splits the
tireData
object where theV
data channel array has significant changes in values.
Note
By default, if criteria are not specified, the split
function splits tire data in order of priority:
segment
Data channels (
Fz
,IP
,alpha
,gamma
,kappa
,Vx
)Time (
et
)
Data Types: int8
| int16
| int32
| int64
| logical
| string
Output Arguments
td
— Split tire data
array of tireData
objects
Split tire data, returned as an array of tireData
objects.
Note
The split
function assigns all the non-data channel values
to all the output tireData
objects.
Version History
Introduced in R2024a
See Also
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)