qc_get_voices End of trail navigation bar

Table of Contents

qc_is_big_endian

Returns true if MATLAB is running on a big endian platform and false otherwise.

Syntax

is_big_endian = qc_is_big_endian
    

Description

Returns true if MATLAB is running on a big endian platform and false otherwise. A big endian platform stores the most-significant byte of integer or floating-point quantities in memory first, with less significant bytes following. A little endian platform stores the least significant byte first.

Most platforms on which MATLAB runs are based on Intel processors, which are little endian. Hence this function typically returns false.

Parameters

This function has no parameters.

Outputs

is_big_endian

True if the current platform is big-endian. Otherwise false.

Examples

if qc_is_big_endian
    y = swapbytes(x); % swap bytes in a value received from a little endian platform
end
    

See Also

 

navigation bar