split
Syntax
Description
This function requires Extended Tire Features for Vehicle Dynamics Blockset.
Examples
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"]);
![Figure contains an axes object. The axes object with title Normal force [N] vs Elapsed time [s], xlabel Elapsed time [s], ylabel Normal force [N] contains a line object which displays its values using only markers. This object represents Normal force [N].](../../examples/vdynblks/win64/SplitTireDataObjectExample_01.png)
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");
![Figure contains an axes object. The axes object with title Normal force [N] vs Elapsed time [s], xlabel Elapsed time [s], ylabel Normal force [N] contains 4 objects of type line. One or more of the lines displays its values using only markers These objects represent 2140, 4270, 5160, 6460.](../../examples/vdynblks/win64/SplitTireDataObjectExample_02.png)
plot(tdSplit,DataVariableNames=["alpha","Fy"],ColorBy="Fz");
![Figure contains an axes object. The axes object with title Lateral force [N] vs Slip angle [rad], xlabel Slip angle [rad], ylabel Lateral force [N] contains 4 objects of type line. One or more of the lines displays its values using only markers These objects represent 2140, 4270, 5160, 6460.](../../examples/vdynblks/win64/SplitTireDataObjectExample_03.png)
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");
![Figure contains an axes object. The axes object with title Lateral force [N] vs Slip angle [rad], xlabel Slip angle [rad], ylabel Lateral force [N] contains 4 objects of type line. One or more of the lines displays its values using only markers These objects represent 2140, 4270, 5160, 6460.](../../examples/vdynblks/win64/SplitTireDataObjectExample_04.png)
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");
![Figure contains an axes object. The axes object with title Lateral force [N] vs Slip angle [rad], xlabel Slip angle [rad], ylabel Lateral force [N] contains 4 objects of type line. One or more of the lines displays its values using only markers These objects represent 2140, 4270, 5160, 6460.](../../examples/vdynblks/win64/SplitTireDataObjectExample_05.png)
Input Arguments
The tire data to split, specified as a tireData object.
Criteria used to split the tireData object, specified as one of
these values:
Logical vector —
truevalues 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
tireDataobject using one or more of the string values listed in the table.Value Description "segment"Splits the
tireDataobject where thesegmentarray has significant changes in values."et"Splits the
tireDataobject where the sampling frequency changes."Fz"Splits the
tireDataobject where theFzdata channel array has significant changes in values."IP"Splits the
tireDataobject where theIPdata channel array has significant changes in values."alpha"Splits the
tireDataobject where thealphadata channel array has significant changes in values."gamma"Splits the
tireDataobject where thegammadata channel array has significant changes in values."kappa"Splits the
tireDataobject where thekappadata channel array has significant changes in values."Vx"Splits the
tireDataobject where theVxdata channel array has significant changes in values."V"Splits the
tireDataobject where theVdata 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:
segmentData channels (
Fz,IP,alpha,gamma,kappa,Vx)Time (
et)
Data Types: int8 | int16 | int32 | int64 | logical | string
Output Arguments
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)