Main Content

machnumber

Compute Mach number using velocity and speed of sound

Description

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.

example

Examples

collapse all

This example shows how to 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

This example shows how to 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 = 1×2

    0.0819    0.0945

This example shows how to 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 = 2×1

    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.

Version History

Introduced in R2006b