Main Content

median

Assign median value of tire data channel in tireData objects to entire tire data channel array

Since R2024a

    Description

    obj=median(obj,channels) assigns the median value of the tire data channel specified by channels in the tireData object specified by obj to the entire data channel array.

    example

    Examples

    collapse all

    Use the median function to assign a steady-state value for tire data channel Fz by calculating the median value of Fz in the tireData objects.

    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 the data. Use the split function to separate the data by tire data channel Fz, resulting in four tireData objects.

    td = split(td,"Fz");

    Use the plot function to view the normal force versus elapsed time using the normal force to assign colors and legend values.

    plot(td,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.

    Assign Steady-State Value to Tire Measurement Data Channel

    Use the median function to assign the tire data channel Fz to the median nominal condition for each tireData object.

    td = median(td,"Fz");

    Plot the resulting tireData objects in td to visualize the modified data set.

    plot(td,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, 6450.

    Input Arguments

    collapse all

    Tire data, specified as a tireData object or an array of tireData objects.

    Tire data channels, specified as a vector of string arrays. String values must be a property of the tireData object. See, tireData Properties.

    Data Types: string

    Output Arguments

    collapse all

    Tire data with the median values assigned to the specified tire data channels, returned as a tireData object or an array of tireData objects.

    Version History

    Introduced in R2024a

    See Also

    |