Main Content

# mean

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

Since R2024a

## Syntax

``obj=mean(obj,channels)``

## Description

example

````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.```

## 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 F`z`, 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");`

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")`

## 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