Main Content

mean

Assign mean value of tire data channel in tireData object to entire tire data channel array

Since R2024a

    Description

    obj=mean(obj,channels) assigns the mean 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 mean function to assign a steady-state value for tire data channel Fz by calculating the mean 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 mean function to assign the tire data channel Fz to the mean nominal condition for each tireData object.

    td = mean(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, 6460.

    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 containing the mean 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

    |