Main Content

# machnumber

Compute Mach number using velocity and speed of sound

## Syntax

``mach = machnumber(velocities,speed_of_sound)``

## Description

example

````mach = machnumber(velocities,speed_of_sound)` computes Mach numbers, `mach`, from an m-by-3 array of Cartesian velocity vectors, `velocities`, and an array of m speeds of sound, `speed_of_sound`. ```

## Examples

collapse all

Determine the Mach number for velocity and speed of sound in feet per second:

`mach = machnumber([84.3905 33.7562 10.1269], 1116.4505)`
```mach = 0.0819```

Determine the Mach number for velocity and speed of sound in meters per second:

`mach = machnumber([25.7222 10.2889 3.0867], [340.2941 295.0696])`
```mach = 0.0819 0.0945```

Determine the Mach number for velocity and speed of sound in knots:

`mach = machnumber([50 20 6; 5 0.5 2], [661.4789 573.5694])`
```mach = 0.0819 0.0094```

## Input Arguments

collapse all

Cartesian velocity vectors, specified as an m-by-3 array. `velocities` and `speed_of_sound` must have the same length.

Data Types: `double`

Speed of sound, specified as an array of m speeds of sound. `velocities` and `speed_of_sound` must have the same length.

Data Types: `double`

## Output Arguments

collapse all

Mach numbers, returned as a scalar or array of m Mach numbers.

## See Also

Introduced in R2006b

## Support Get trial now