Documentation Center

  • Trial Software
  • Product Updates

Functions and Objects Supported for C and C++ Code Generation — Alphabetical List

You can generate efficient C and C++ code for a subset of MATLAB® built-in functions and toolbox functions, classes, and System objects that you call from MATLAB code. These function, classes, and System objects appear in alphabetical order in the following table.

To find supported functions, classes, and System objects by MATLAB category or toolbox, see Functions and Objects Supported for C and C++ Code Generation — Categorical List.

Name

Product

Remarks and Limitations

abs

MATLAB

abs

Fixed-Point Designer™

accumneg

Fixed-Point Designer

accumpos

Fixed-Point Designer

acos

MATLAB

  • Generates an error during simulation and returns NaN in generated code when the input value x is real, but the output should be complex. To get the complex result, make the input value complex by passing in complex(x).

acosd

MATLAB

acosh

MATLAB

  • Generates an error during simulation and returns NaN in generated code when the input value x is real, but the output should be complex. To get the complex result, make the input value complex by passing in complex(x).

acot

MATLAB

acotd

MATLAB

acoth

MATLAB

acsc

MATLAB

acscd

MATLAB

acsch

MATLAB

add

Fixed-Point Designer

Code generation in MATLAB does not support the syntax F.add(a,b). You must use the syntax add(F,a,b).

affine2d

Image Processing Toolbox™

When generating code, you can only specify singular objects—arrays of objects are not supported.

aictest

Phased Array System Toolbox™

Does not support variable-size inputs.

albersheim

Phased Array System Toolbox

Does not support variable-size inputs.

all

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

all

Fixed-Point Designer

ambgfun

Phased Array System Toolbox

Does not support variable-size inputs.

and

MATLAB

any

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

any

Fixed-Point Designer

aperture2gain

Phased Array System Toolbox

Does not support variable-size inputs.

asec

MATLAB

asecd

MATLAB

asech

MATLAB

asin

MATLAB

  • Generates an error during simulation and returns NaN in generated code when the input value x is real, but the output should be complex. To get the complex result, make the input value complex by passing in complex(x).

asind

MATLAB

asinh

MATLAB

assert

MATLAB

  • Generates specified error messages at compile time only if all input arguments are constants or depend on constants. Otherwise, generates specified error messages at run time.

  • For standalone code generation, excluded from the generated code.

  • See Rules for Using assert Function.

assignDetectionsToTracks

Computer Vision System Toolbox™

Compile-time constant input: No restriction.
Supports MATLAB Function block: Yes

atan

MATLAB

atan2

MATLAB

atan2

Fixed-Point Designer

atan2d

MATLAB

atand

MATLAB

atanh

MATLAB

  • Generates an error during simulation and returns NaN in generated code when the input value x is real, but the output should be complex. To get the complex result, make the input value complex by passing in complex(x).

az2broadside

Phased Array System Toolbox

Does not support variable-size inputs.

azel2phitheta

Phased Array System Toolbox

Does not support variable-size inputs.

azel2phithetapat

Phased Array System Toolbox

Does not support variable-size inputs.

azel2uv

Phased Array System Toolbox

Does not support variable-size inputs.

azel2uvpat

Phased Array System Toolbox

Does not support variable-size inputs.

azelaxes

Phased Array System Toolbox

Does not support variable-size inputs.

barthannwin

Signal Processing Toolbox™

Window length must be a constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

bartlett

Signal Processing Toolbox

Window length must be a constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

beat2range

Phased Array System Toolbox

Does not support variable-size inputs.

besselap

Signal Processing Toolbox

Filter order must be a constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

beta

MATLAB

betacdf

Statistics Toolbox™

betainc

MATLAB

Always returns a complex result.

betaincinv

MATLAB

Always returns a complex result.

betainv

Statistics Toolbox

betaln

MATLAB

betapdf

Statistics Toolbox

betarnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

betastat

Statistics Toolbox

bi2de

Communications System Toolbox™

billingsleyicm

Phased Array System Toolbox

Does not support variable-size inputs.

bin2dec

MATLAB

  • Does not match MATLAB when the input is empty.

binaryFeatures

Computer Vision System Toolbox

binocdf

Statistics Toolbox

binoinv

Statistics Toolbox

binopdf

Statistics Toolbox

binornd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

binostat

Statistics Toolbox

bitand

MATLAB

bitand

Fixed-Point Designer

  • Not supported for slope-bias scaled fi objects.

bitandreduce

Fixed-Point Designer

bitcmp

MATLAB

bitcmp

Fixed-Point Designer

bitconcat

Fixed-Point Designer

bitget

MATLAB

bitget

Fixed-Point Designer

bitmax

MATLAB

bitor

MATLAB

bitor

Fixed-Point Designer

  • Not supported for slope-bias scaled fi objects.

bitorreduce

Fixed-Point Designer

bitreplicate

Fixed-Point Designer

bitrevorder

Signal Processing Toolbox

bitrol

Fixed-Point Designer

bitror

Fixed-Point Designer

bitset

MATLAB

bitset

Fixed-Point Designer

bitshift

MATLAB

bitshift

Fixed-Point Designer

bitsliceget

Fixed-Point Designer

bitsll

Fixed-Point Designer

  • Generated code may not handle out of range shifting.

bitsra

Fixed-Point Designer

  • Generated code may not handle out of range shifting.

bitsrl

Fixed-Point Designer

  • Generated code may not handle out of range shifting.

bitxor

MATLAB

bitxor

Fixed-Point Designer

  • Not supported for slope-bias scaled fi objects.

bitxorreduce

Fixed-Point Designer

blackman

Signal Processing Toolbox

Window length must be a constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

blackmanharris

Signal Processing Toolbox

Window length must be a constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

blanks

MATLAB

blkdiag

MATLAB

bohmanwin

Signal Processing Toolbox

Window length must be a constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

break

MATLAB

BRISKPointsComputer Vision System ToolboxCompile-time constant inputs: No restriction
Supports MATLAB Function block: No
To index locations with this object, use the syntax: points.Location(idx,:), for points object. See visionRecovertformCodeGeneration_kernel.mvisionRecovertformCodeGeneration_kernel.m, which is used in the Introduction to Code Generation with Feature Matching and Registration example.

broadside2az

Phased Array System Toolbox

Does not support variable-size inputs.

bsxfun

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

buttap

Signal Processing Toolbox

Filter order must be a constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

butter

Signal Processing Toolbox

Filter coefficients must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

buttord

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

bwlookup

Image Processing Toolbox

  • For best results, specify an input image of class logical.

bwmorph

Image Processing Toolbox

  • The text string specifying the operation must be a constant and, for best results, specify an input image of class logical.

bwpack

Image Processing Toolbox

Generated code for this function uses a precompiled platform-specific shared library.

bwselect

Image Processing Toolbox

Supports only the 3 and 4 input argument syntaxes: BW2 = bwselect(BW,c,r) and BW2 = bwselect(BW,c,r,n). The optional fourth input argument, n, must be a compile-time constant. In addition, with code generation, bwselect only supports only the 1 and 2 output argument  syntaxes: BW2 = bwselect(___) or [BW2, idx] = bwselect(___).

Generated code for this function uses a precompiled platform-specific shared library.

bwunpack

Image Processing Toolbox

Generated code for this function uses a precompiled platform-specific shared library.

ca2tf

DSP System Toolbox™

All inputs must be constant. Expressions or variables are allowed if their values do not change.

cart2pol

MATLAB

cart2sph

MATLAB

cart2sphvec

Phased Array System Toolbox

Does not support variable-size inputs.

cast

MATLAB

cat

MATLAB

cbfweights

Phased Array System Toolbox

Does not support variable-size inputs.

cdf

Statistics Toolbox

ceil

MATLAB

ceil

Fixed-Point Designer

cfirpm

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

char

MATLAB

cheb1ap

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

cheb1ord

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

cheb2ap

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

cheb2ord

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

chebwin

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

cheby1

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

cheby2

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

chi2cdf

Statistics Toolbox

chi2inv

Statistics Toolbox

chi2pdf

Statistics Toolbox

chi2rnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

chi2stat

Statistics Toolbox

chol

MATLAB

circpol2pol

Phased Array System Toolbox

Does not support variable-size inputs.

circshift

MATLAB

cl2tf

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

class

MATLAB

colon

MATLAB

  • Does not accept complex inputs.

  • Does not accept a logical interval,i.

  • Does not accept vector inputs.

  • Inputs must be constants.

  • Uses single-precision arithmetic to produce single-precision results.

comm.ACPR

Communications System Toolbox

Code Generation with System Objects and Functions

comm.AGC

Communications System Toolbox

Code Generation with System Objects and Functions

comm.AlgebraicDeinterleaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.APPDecoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.AWGNChannel

Communications System Toolbox

Code Generation with System Objects and Functions

comm.BarkerCode

Communications System Toolbox

Code Generation with System Objects and Functions

comm.BCHDecoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.BCHEncoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.BinarySymmetricChannel

Communications System Toolbox

Code Generation with System Objects and Functions

comm.BlockDeinterleaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.BlockInterleaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.BPSKDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.BPSKModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.CCDF

Communications System Toolbox

Code Generation with System Objects and Functions

comm.ConstellationDiagram

Communications System Toolbox

Code Generation with System Objects and Functions

comm.ConvolutionalDeinterleaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.ConvolutionalEncoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.ConvolutionalInterleaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.CPFSKDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.CPFSKModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.CPMCarrierPhaseSynchronizer

Communications System Toolbox

Code Generation with System Objects and Functions

comm.CPMDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.CPMModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.CRCDetector

Communications System Toolbox

Code Generation with System Objects and Functions

comm.CRCGenerator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.DBPSKDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.DBPSKModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.Descrambler

Communications System Toolbox

Code Generation with System Objects and Functions

comm.DifferentialDecoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.DifferentialEncoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.DiscreteTimeVCO

Communications System Toolbox

Code Generation with System Objects and Functions

comm.DPSKDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.DPSKModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.DQPSKDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.DQPSKModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.EarlyLateGateTimingSynchronizer

Communications System Toolbox

Code Generation with System Objects and Functions

comm.ErrorRate

Communications System Toolbox

Code Generation with System Objects and Functions

comm.EVM

Communications System Toolbox

Code Generation with System Objects and Functions

comm.FSKDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.FSKModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.GardnerTimingSynchronizer

Communications System Toolbox

Code Generation with System Objects and Functions

comm.GeneralQAMDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.GeneralQAMModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.GeneralQAMTCMDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.GeneralQAMTCMModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.GMSKDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.GMSKModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.GMSKTimingSynchronizer

Communications System Toolbox

Code Generation with System Objects and Functions

comm.GoldSequence

Communications System Toolbox

Code Generation with System Objects and Functions

comm.HadamardCode

Communications System Toolbox

Code Generation with System Objects and Functions

comm.HDLCRCDetector

Communications System Toolbox

Code Generation with System Objects and Functions

comm.HDLCRCGenerator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.HDLRSDecoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.HDLRSEncoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.HelicalDeinterleaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.HelicalInterleaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.IntegrateAndDumpFilter

Communications System Toolbox

Code Generation with System Objects and Functions

comm.KasamiSequence

Communications System Toolbox

Code Generation with System Objects and Functions

comm.LDPCDecoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.LDPCEncoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.LTEMIMOChannel

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MatrixDeinterleaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MatrixHelicalScanDeinterleaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MatrixHelicalScanInterLeaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MatrixInterleaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MemorylessNonlinearity

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MER

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MIMOChannel

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MLSEEqualizer

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MSKDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MSKModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MSKTimingSynchronizer

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MeullerMullerTimingSynchronizer

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MultiplexedDeinterleaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.MultiplexedInterleaver

Communications System Toolbox

Code Generation with System Objects and Functions

comm.OFDMDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.OFDMModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.OSTBCCombiner

Communications System Toolbox

Code Generation with System Objects and Functions

comm.OSTBCEncoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.OQPSKDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.OQPSKModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.PAMDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.PAMModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.PhaseRequencyOffset

Communications System Toolbox

Code Generation with System Objects and Functions

comm.PhaseNoise

Communications System Toolbox

Code Generation with System Objects and Functions

comm.PNSequence

Communications System Toolbox

Code Generation with System Objects and Functions

comm.PSKCoarseFrequencyEstimator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.PSKCoarseFrequenceEstimator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.PSKDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.PSKModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.PSKTCMDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.PSKTCMModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.QAMCoarseFrequencyEstimator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.QPSKDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.QPSKModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.RaisedCosineReceiveFilter

Communications System Toolbox

Code Generation with System Objects and Functions

comm.RaisedCosineTransmitFilter

Communications System Toolbox

Code Generation with System Objects and Functions

comm.RayleighChannel

Communications System Toolbox

Code Generation with System Objects and Functions

comm.RectangularQAMDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.RectangularModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.RectangularQAMTCMDemodulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.RectangularQAMTCMModulator

Communications System Toolbox

Code Generation with System Objects and Functions

comm.RicianChannel

Communications System Toolbox

Code Generation with System Objects and Functions

comm.RSDecoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.RSEncoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.Scrambler

Communications System Toolbox

Code Generation with System Objects and Functions

comm.SphereDecoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.ThermalNoise

Communications System Toolbox

Code Generation with System Objects and Functions

comm.TurboDecoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.TurboEncoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.ViterbiDecoder

Communications System Toolbox

Code Generation with System Objects and Functions

comm.WalshCode

Communications System Toolbox

Code Generation with System Objects and Functions

compan

MATLAB

complex

MATLAB

complex

Fixed-Point Designer

computer

MATLAB

  • Information about the computer on which the code generation software is running.

  • Use only when the code generation target is S-function (Simulation) or MEX-function.

cond

MATLAB

conj

MATLAB

conj

Fixed-Point Designer

conndef

Image Processing Toolbox

All input arguments must be compile-time constants.

continue

MATLAB

conv

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

conv

Fixed-Point Designer

  • Variable-sized inputs are only supported when the SumMode property of the governing fimath is set to Specify precision or Keep LSB.

  • For variable-sized signals, you may see different results between MATLAB and the generated code.

    • In generated code, the output for variable-sized signals is computed using the SumMode property of the governing fimath.

    • In MATLAB, the output for variable-sized signals is computed using the SumMode property of the governing fimath when both inputs are nonscalar. However, if either input is a scalar, MATLAB computes the output using the ProductMode of the governing fimath.

conv2

MATLAB

convergent

Fixed-Point Designer

convn

MATLAB

cordicabs

Fixed-Point Designer

  • Variable-size signals are not supported.

cordicangle

Fixed-Point Designer

  • Variable-size signals are not supported.

cordicatan2

Fixed-Point Designer

  • Variable-size signals are not supported.

cordiccart2pol

Fixed-Point Designer

  • Variable-size signals are not supported.

cordiccexp

Fixed-Point Designer

  • Variable-size signals are not supported.

cordiccos

Fixed-Point Designer

  • Variable-size signals are not supported.

cordicpol2cart

Fixed-Point Designer

  • Variable-size signals are not supported.

cordicrotate

Fixed-Point Designer

  • Variable-size signals are not supported.

cordicsin

Fixed-Point Designer

  • Variable-size signals are not supported.

cordicsincos

Fixed-Point Designer

  • Variable-size signals are not supported.

cornerPoints

Computer Vision System Toolbox

Compile-time constant input: No restriction
Supports MATLAB Function block: No
To index locations with this object, use the syntax: points.Location(idx,:), for points object. See visionRecovertformCodeGeneration_kernel.mvisionRecovertformCodeGeneration_kernel.m, which is used in the Introduction to Code Generation with Feature Matching and Registration example.

corrcoef

MATLAB

  • Row-vector input is only supported when the first two inputs are vectors and nonscalar.

cos

MATLAB

cos

Fixed-Point Designer

cosd

MATLAB

cosh

MATLAB

cot

MATLAB

cotd

MATLAB

coth

MATLAB

cov

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

cross

MATLAB

csc

MATLAB

cscd

MATLAB

csch

MATLAB

ctranspose

MATLAB

ctranspose

Fixed-Point Designer

cumprod

MATLAB

  • Logical inputs are not supported. Cast input to double first.

cumsum

MATLAB

  • Logical inputs are not supported. Cast input to double first.

cumtrapz

MATLAB

db2pow

Signal Processing Toolbox

dct

Signal Processing Toolbox

de2bi

Communications System Toolbox

deal

MATLAB

deblank

MATLAB

  • Supports only inputs from the char class.

  • Input values must be in the range 0-127.

dec2bin

MATLAB

  • If input d is double, d must be less than 2^52.

  • If input d is single, d must be less than 2^23.

  • Unless you specify input n to be constant and n is large enough that the output has a fixed number of columns regardless of the input values, this function requires variable-sizing support. Without variable-sizing support, n must be at least 52 for double, 23 for single, 16 for char, 32 for int32, 16 for int16, and so on.

dec2hex

MATLAB

  • If input d is double, d must be less than 2^52.

  • If input d is single, d must be less than 2^23.

  • Unless you specify input n to be constant and n is large enough that the output has a fixed number of columns regardless of the input values, this function requires variable-sizing support. Without variable-sizing support, n must be at least 13 for double, 6 for single, 4 for char, 8 for int32, 4 for int16, and so on.

dechirp

Phased Array System Toolbox

Does not support variable-size inputs.

deconv

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

del2

MATLAB

delayseq

Phased Array System Toolbox

Does not support variable-size inputs.

depressionang

Phased Array System Toolbox

Does not support variable-size inputs.

det

MATLAB

detectBRISKFeatures

Computer Vision System Toolbox

Supports MATLAB Function block: No
Generated code for this function uses a precompiled platform-specific shared library.

detectFASTFeatures

Computer Vision System Toolbox

Supports MATLAB Function block: No
Generated code for this function uses a precompiled platform-specific shared library.

detectHarrisFeatures

Computer Vision System Toolbox

Compile-time constant input: FilterSize
Supports MATLAB Function block: No
Generated code for this function uses a precompiled platform-specific shared library.

detectMinEigenFeatures

Computer Vision System Toolbox

Compile-time constant input: FilterSize
Supports MATLAB Function block: No
Generated code for this function uses a precompiled platform-specific shared library.

detectMSERFeatures

Computer Vision System Toolbox

Compile-time constant input: No restriction
Supports MATLAB Function block: No
For code generation, the function outputs regions.PixelList as an array. The region sizes are defined in regions.Lengths.

detectSURFFeatures

Computer Vision System Toolbox

Compile-time constant input: No restrictions
Supports MATLAB Function block: No
Generated code for this function uses a precompiled platform-specific shared library.

detrend

MATLAB

  • If supplied and not empty, the input argument bp must satisfy the following requirements:

diag

MATLAB

  • If supplied, the argument representing the order of the diagonal matrix must be a real and scalar integer value.

  • For variable-size inputs that are variable-length vectors (1-by-: or :-by-1), diag:

    • Treats the input as a vector input.

    • Returns a matrix with the given vector along the specified diagonal.

  • For variable-size inputs that are not variable-length vectors, diag:

    • Treats the input as a matrix.

    • Does not support inputs that are vectors at run time.

    • Returns a variable-length vector.

    If the input is variable-size (:m-by-:n) and has shape 0-by-0 at run time, the output is 0-by-1 not 0-by-0. However, if the input is a constant size 0-by-0, the output is [].

  • For variable-size inputs that are not variable-length vectors (1-by-: or :-by-1), diag treats the input as a matrix from which to extract a diagonal vector. This behavior occurs even if the input array is a vector at run time. To force diag to build a matrix from variable-size inputs that are not 1-by-: or :-by-1, use:

    • diag(x(:)) instead of diag(x)

    • diag(x(:),k) instead of diag(x,k)

  • Variable Sizing Restrictions for Code Generation of Toolbox Functions

diag

Fixed-Point Designer

  • If supplied, the index, k, must be a real and scalar integer value that is not a fi object.

diff

MATLAB

disparity

Computer Vision System Toolbox

Compile-time constant input: Method.
Supports MATLAB Function block: No
Generated code for this function uses a precompiled platform-specific shared library.

divide

Fixed-Point Designer

  • Any non-fi input must be constant. Its value must be known at compile time so that it can be cast to a fi object.

  • Complex and imaginary divisors are not supported.

  • The syntax T.divide(a,b) is not supported.

dop2speed

Phased Array System Toolbox

Does not support variable-size inputs.

dopsteeringvec

Phased Array System Toolbox

Does not support variable-size inputs.

dot

MATLAB

double

MATLAB

double

Fixed-Point Designer

downsample

Signal Processing Toolbox

dpss

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

dsp.AdaptiveLatticeFilter

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.AffineProjectionFilter

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.AllpoleFilter

DSP System Toolbox

dsp.AnalyticSignal

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.ArrayPlot

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.ArrayVectorAdder

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.ArrayVectorDivider

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.ArrayVectorMultiplier

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.ArrayVectorSubtractor

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.AudioFileReader

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.AudioRecorder

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.AudioFileWriter

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.AudioPlayer

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Autocorrelator

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.BiquadFilter

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.BurgAREstimator

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.BurgSpectrumEstimator

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.CepstralToLPC

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.CICDecimator

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.CICInterpolator

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Convolver

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Counter

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Crosscorrelator

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.CrossSpectrumEstimator

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.CumulativeProduct

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.CumulativeSum

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.DCBlocker

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.DCT

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Delay

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.DelayLine

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.DigitalDownConverter

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.DigitalUpConverter

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.DigitalFilter

DSP System Toolbox

dsp.FastTransversalFilter

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.FFT

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.FilteredXLMSFilter

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.FIRDecimator

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.FIRFilter

DSP System Toolbox

dsp.FIRInterpolator

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.FIRRateConverter

DSP System Toolbox

System Objects in MATLAB Code Generation

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Histogram

DSP System Toolbox

dsp.IDCT

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.IFFT

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.IIRFilter

DSP System Toolbox

dsp.Interpolator

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.KalmanFilter

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.LDLFactor

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.LevinsonSolver

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.LMSFilter

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.LowerTriangularSolver

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.LPCToAutocorrelation

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.LPCToCepstral

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.LPCToLSF

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.LPCToLSP

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.LPCToRC

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.LSFToLPC

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.LSPToLPC

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.LUFactor

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Maximum

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Mean

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Median

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Minimum

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.NCO

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Normalizer

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.PeakFinder

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.PhaseUnwrapper

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.RCToAutocorrelation

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.RCToLPC

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.RMS

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.RLSFilter

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.ScalarQuantizerDecoder

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.ScalarQuantizerEncoder

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.SignalSource

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.SineWave

DSP System Toolbox

dsp.SpectrumAnalyzer

DSP System Toolbox

This System object™ does not generate code. It is automatically declared as an extrinsic variable using the coder.extrinsic function.

dsp.SpectrumEstimator

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.StandardDeviation

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.TimeScope

DSP System Toolbox

This System object does not generate code. It is automatically declared as an extrinsic variable using the coder.extrinsic function.

dsp.TransferFunctionEstimator

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.UDPReceiver

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.UDPSender

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.UpperTriangularSolver

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.VariableFractionDelay

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.VariableIntegerDelay

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Variance

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.VectorQuantizerDecoder

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.VectorQuantizerEncoder

DSP System Toolbox

System Objects in MATLAB Code Generation

dsp.Window

DSP System Toolbox

dsp.ZeroCrossingDetector

DSP System Toolbox

System Objects in MATLAB Code Generation

edge

Image Processing Toolbox

The method, direction, and sigma arguments must be a compile-time constants. In addition, nonprogrammatic syntaxes are not supported. For example, the syntax edge(im), where edge does not return a value but displays an image instead, is not supported.

Generated code for this function uses a precompiled platform-specific shared library.

effearthradius

Phased Array System Toolbox

Does not support variable-size inputs.

eig

MATLAB

  • QZ algorithm used in all cases, whereas MATLAB might use different algorithms for different inputs. Consequently, V might represent a different basis of eigenvectors, and the eigenvalues in D might not be in the same order as in MATLAB.

  • With one input, [V,D] = eig(A), the results will be similar to those obtained using [V,D] = eig(A,eye(size(A)),'qz') in MATLAB, except that for code generation, the columns of V are normalized.

  • Options 'balance', 'nobalance' are not supported for the standard eigenvalue problem, and 'chol' is not supported for the symmetric generalized eigenvalue problem.

  • Outputs are of complex type.

ellip

Signal Processing Toolbox

Inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

ellipap

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

ellipke

MATLAB

ellipord

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

end

MATLAB

end

Fixed-Point Designer

epipolarLine

Computer Vision System Toolbox

Compile-time constant input: No restrictions.
Supports MATLAB Function block: Yes

eps

MATLAB

eps

Fixed-Point Designer

  • Supported for scalar fixed-point signals only.

  • Supported for scalar, vector, and matrix, fi single and fi double signals.

eq

MATLAB

eq

Fixed-Point Designer

Not supported for fixed-point signals with different biases.

erf

MATLAB

erfc

MATLAB

erfcinv

MATLAB

erfcx

MATLAB

erfinv

MATLAB

error

MATLAB

For standalone code generation, excluded from the generated code.

espritdoa

Phased Array System Toolbox

Does not support variable-size inputs.

estimateFundamentalMatrix

Computer Vision System Toolbox

Compile-time constant input: Method, OutputClass, DistanceType, and ReportRuntimeError.
Supports MATLAB Function block: Yes

estimateGeometricTransform

Computer Vision System Toolbox

Compile-time constant input: transformType
Supports MATLAB Function block: No

estimateUncalibrated
Rectification

Computer Vision System Toolbox

Compile-time constant input: transformType
Supports MATLAB Function block: No

extractFeatures

Computer Vision System Toolbox

Generates platform-dependent library: Yes for BRISK, FREAK, and SURF methods only.
Compile-time constant input: Method
Supports MATLAB Function block: Yes for Block method only.
Generated code for this function uses a precompiled platform-specific shared library.

extractHOGFeatures

Computer Vision System Toolbox

Compile-time constant input: No
Supports MATLAB Function block: No

evcdf

Statistics Toolbox

evinv

Statistics Toolbox

evpdf

Statistics Toolbox

evrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

evstat

Statistics Toolbox

exp

MATLAB

expcdf

Statistics Toolbox

expint

MATLAB

expinv

Statistics Toolbox

expm

MATLAB

expm1

MATLAB

exppdf

Statistics Toolbox

exprnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

expstat

Statistics Toolbox

eye

MATLAB

classname must be a built-in MATLAB numeric type. Does not invoke the static eye method for other classes. For example, eye(m, n, 'myclass') does not invoke myclass.eye(m,n).

factor

MATLAB

  • The maximum double precision input is 2^33.

  • The maximum single precision input is 2^25.

  • The input n cannot have type int64 or uint64.

factorial

MATLAB

false

MATLAB

  • Dimensions must be real, nonnegative, integers.

fcdf

Statistics Toolbox

fclose

MATLAB

fft

MATLAB

fft2

MATLAB

  • Length of input matrix dimensions must each be a power of 2.

fftn

MATLAB

  • Length of input matrix dimensions must each be a power of 2.

fftshift

MATLAB

fi

Fixed-Point Designer

  • Use to create a fixed-point constant or variable.

  • The default constructor syntax without input arguments is not supported.

  • The rand fi('PropertyName',PropertyValue...) is not supported. To use property name/property value pairs, you must first specify the value v of the fi object as in fi(v,'PropertyName',PropertyValue...).

  • If the input value is not known at compile time, you must provide complete numerictype information.

  • All properties related to data type must be constant for code generation.

  • numerictype object information must be available for non-fixed-point Simulink® inputs.

filter

MATLAB

filter

Fixed-Point Designer

  • Variable-sized inputs are only supported when the SumMode property of the governing fimath is set to Specify precision or Keep LSB.

filter2

MATLAB

filtfilt

Signal Processing Toolbox

Filter coefficients must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

fimath

Fixed-Point Designer

  • Fixed-point signals coming in to a MATLAB Function block from Simulink are assigned the fimath object defined in the MATLAB Function dialog in the Model Explorer.

  • Use to create fimath objects in generated code.

  • If the ProductMode property of the fimath object is set to anything other than FullPrecision, the ProductWordLength and ProductFractionLength properties must be constant.

  • If the SumMode property of the fimath object is set to anything other than FullPrecision, the SumWordLength and SumFractionLength properties must be constant.

find

MATLAB

  • Issues an error if a variable-sized input becomes a row vector at run time.

      Note:   This limitation does not apply when the input is scalar or a variable-length row vector.

  • For variable-sized inputs, the shape of empty outputs, 0-by-0, 0-by-1, or 1-by-0, depends on the upper bounds of the size of the input. The output might not match MATLAB when the input array is a scalar or [] at run time. If the input is a variable-length row vector, the size of an empty output is 1-by-0, otherwise it is 0-by-1.

findpeaks

Signal Processing Toolbox

finv

Statistics Toolbox

fir1

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

fir2

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

firceqrip

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

fircls

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

fircls1

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

fireqint

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

firgr

DSP System Toolbox
  • All inputs must be constant. Expressions or variables are allowed if their values do not change.

  • Does not support syntaxes that have cell array input.

firhalfband

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

firlpnorm

DSP System Toolbox
  • All inputs must be constant. Expressions or variables are allowed if their values do not change.

  • Does not support syntaxes that have cell array input.

firls

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

firminphase

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

firnyquist

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

firpr2chfb

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

firpm

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

firpmord

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

fix

MATLAB

fix

Fixed-Point Designer

fixed.Quantizer

Fixed-Point Designer

flattopwin

Signal Processing Toolbox

All inputs must be constants. Expressions or variables are allowed if their values do not change.

 Specifying constants

flintmax

MATLAB

flip

MATLAB

flipdim

MATLAB

    Note:   flipdim will be removed in a future release. Use flip instead.

fliplr

MATLAB

flipud

MATLAB

floor

MATLAB

floor

Fixed-Point Designer

fminsearch

MATLAB

  • Ignores the Display option. Does not print status information during execution. Check the exitflag output for the exit condition.

  • The output structure does not include the algorithm or message fields.

  • Ignores the OutputFcn and PlotFcns options.

fopen

MATLAB

  • Does not support:

    • machineformat, encoding, or fileID inputs

    • message output

    • fopen(‘all')

  • If you disable extrinsic calls, you cannot return fileIDs created with fopen to MATLAB or extrinsic functions. You can only use such fileIDs internally.

  • You can open up to 20 files when generating C/C++ executables, static libraries, or dynamic libraries.

  • The generated code does not report errors from invalid file identifiers. Write your own file open error handling in your MATLAB code. Test whether fopen returns -1 which indicates that the file open failed. For example:

    ...
    fid = fopen(filename, 'r');
    if fid == -1
    		% fopen failed
    
    else
    %fopen successful, okay to call fread
    A = fread(fid);
    ...

for

MATLAB

fpdf

Statistics Toolbox

fprintf

MATLAB

  • Does not support:

    • b and t subtypes on %u, %o %x, and %X formats

    • $ flag for reusing input arguments

    • printing arrays

  • There is no automatic casting. Input arguments must match their format types for predictable results.

  • Escaped characters are limited to the decimal range of 0–127.

  • A call to fprintf with fileID equal to 1 or 2 becomes printf in the generated C/C++ code in the following cases:

    • The fprintf call is inside a parfor loop.

    • Extrinsic calls are disabled.

  • When the MATLAB behavior differs from the C compiler behavior, fprintf matches the C compiler behavior in the following cases:

    • The format specifier has a corresponding C format specifier, for example, %e or %E.

    • The fprintf call is inside a parfor loop.

    • Extrinsic calls are disabled.

  • When you call fprintf with the format specifier %s, do not put a null character in the middle of the input string. Use fprintf(fid, '%c', char(0)) to write a null character.

  • When you call fprintf with an integer format specifier, the type of the integer argument must be a type that the target hardware can represent as a native C type. For example, if you call fprintf('%d', int64(n)), the target hardware must have a native C type that supports a 64-bit integer.

fread

MATLAB

  • precision must be a constant.

  • The source and output that precision specifies cannot have values long, ulong, unsigned long, bitN, or ubitN.

  • You cannot use the machineformat input.

  • If the source or output that precision specifies is a C type, for example, int, the target and production sizes for that type must:

    • Match.

    • Map directly to a MATLAB type.

  • If the fread call reads the entire file, all of the data must fit in the largest array available for code generation.

  • If sizeA is not constant or contains a nonfinite element, then dynamic memory allocation is required.

  • Treats a char value for source or output as a signed 8-bit integer. Use values only between 0 and 127.

  • The generated code does not report file read errors. Write your own file read error handling in your MATLAB code. Test that the number of bytes read matches the number of bytes that you requested. For example:

    ...
    N = 100;
    [vals,numRead] = fread(fid, N,'*double');
    if numRead ~= N
        %fewer elements read than expected
    end
    ...

freqspace

MATLAB

freqz

Signal Processing Toolbox

When called with no output arguments, and without a semicolon at the end, freqz returns the complex frequency response of the input filter, evaluated at 512 points.

If the semicolon is added, the function produces a plot of the magnitude and phase response of the filter.

See freqz With No Output Arguments.

frnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

fspecial

Image Processing Toolbox

All inputs must be constants at compilation time. Expressions or variables are allowed if their values do not change.

fspl

Phased Array System Toolbox

Does not support variable-size inputs.

fstat

Statistics Toolbox

full

MATLAB

fzero

MATLAB

  • The first argument must be a function handle. Does not support structure, inline function, or string inputs for the first argument.

  • Supports up to three output arguments. Does not support the fourth output argument (the output structure).

gain2aperture

Phased Array System Toolbox

Does not support variable-size inputs.

gamcdf

Statistics Toolbox

gaminv

Statistics Toolbox

gamma

MATLAB

gammainc

MATLAB

Output is always complex.

gammaincinv

MATLAB

Output is always complex.

gammaln

MATLAB

gampdf

Statistics Toolbox

gamrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

gamstat

Statistics Toolbox

gausswin

Signal Processing Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

gcd

MATLAB

ge

MATLAB

ge

Fixed-Point Designer

  • Not supported for fixed-point signals with different biases.

geocdf

Statistics Toolbox

geoinv

Statistics Toolbox

geomean

Statistics Toolbox

geopdf

Statistics Toolbox

geornd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

geostat

Statistics Toolbox

get

Fixed-Point Designer

  • The syntax structure = get(o) is not supported.

getlsb

Fixed-Point Designer

getmsb

Fixed-Point Designer

getrangefromclass

Image Processing Toolbox

gevcdf

Statistics Toolbox

gevinv

Statistics Toolbox

gevpdf

Statistics Toolbox

gevrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

gevstat

Statistics Toolbox

global2localcoord

Phased Array System Toolbox

Does not support variable-size inputs.

gpcdf

Statistics Toolbox

gpinv

Statistics Toolbox

gppdf

Statistics Toolbox

gprnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

gpstat

Statistics Toolbox

gradient

MATLAB

grazingang

Phased Array System Toolbox

Does not support variable-size inputs.

gt

MATLAB

gt

Fixed-Point Designer

  • Not supported for fixed-point signals with different biases.

hadamard

MATLAB

hamming

Signal Processing Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

hankel

MATLAB

hann

Signal Processing Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

harmmean

Statistics Toolbox

hdlram

Fixed-Point Designer

hex2dec

MATLAB

hex2num

MATLAB

  • For n = hex2num(S), size(S,2) <= length(num2hex(0))

hilb

MATLAB

hist

MATLAB

  • Histogram bar plotting not supported; call with at least one output argument.

  • If supplied, the second argument x must be a scalar constant.

  • Inputs must be real.

histc

MATLAB

horizonrange

Phased Array System Toolbox

Does not support variable-size inputs.

horzcat

Fixed-Point Designer

hygecdf

Statistics Toolbox

hygeinv

Statistics Toolbox

hygepdf

Statistics Toolbox

hygernd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

hygestat

Statistics Toolbox

hypot

MATLAB

icdf

Statistics Toolbox

idct

Signal Processing Toolbox

if, elseif, else

MATLAB

idivide

MATLAB

  • For efficient generated code, MATLAB rules for divide by zero are supported only for the 'round' option.

ifft

MATLAB

ifft2

MATLAB

  • Length of input matrix dimensions must each be a power of 2.

  • Does not support the 'symmetric' option.

ifftn

MATLAB

  • Length of input matrix dimensions must each be a power of 2.

  • Does not support the 'symmetric' option.

ifftshift

MATLAB

ifir

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

iircomb

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

iirgrpdelay

DSP System Toolbox
  • All inputs must be constant. Expressions or variables are allowed if their values do not change.

  • Does not support syntaxes that have cell array input.

iirlpnorm

DSP System Toolbox
  • All inputs must be constant. Expressions or variables are allowed if their values do not change.

  • Does not support syntaxes that have cell array input.

iirlpnormc

DSP System Toolbox
  • All inputs must be constant. Expressions or variables are allowed if their values do not change.

  • Does not support syntaxes that have cell array input.

iirnotch

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

iirpeak

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

im2double

Image Processing Toolbox

im2int16

Image Processing Toolbox

Generated code for this function uses a precompiled platform-specific shared library.

im2single

Image Processing Toolbox

im2uint8

Image Processing Toolbox

Generated code for this function uses a precompiled platform-specific shared library.

im2uint16

Image Processing Toolbox

Generated code for this function uses a precompiled platform-specific shared library.

imag

MATLAB

imag

Fixed-Point Designer

imbothat

Image Processing Toolbox

The input image IM must be either 2-D or 3-D image. The structuring element input argument SE must be a compile-time constant.

Generated code for this function uses a precompiled platform-specific shared library.

imclose

Image Processing Toolbox

The input image IM must be either 2-D or 3-D image. The structuring element input argument SE must be a compile-time constant.

Generated code for this function uses a precompiled platform-specific shared library.

imcomplement

Image Processing Toolbox

Does not support int64 and uint64 data types.

imdilate

Image Processing Toolbox

The input image IM must be either 2-D or 3-D image. The SE, PACKOPT, and SHAPE input arguments must be a compile-time constant. The structuring element argument SE must be a single element—arrays of structuring elements are not supported. To obtain the same result as that obtained using an array of structuring elements, call the function sequentially.

Generated code for this function uses a precompiled platform-specific shared library.

imerode

Image Processing Toolbox

The input image IM must be either 2-D or 3-D image. The SE, PACKOPT, and SHAPE input arguments must be a compile-time constant. The structuring element argument SE must be a single element—arrays of structuring elements are not supported. To obtain the same result as that obtained using an array of structuring elements, call the function sequentially.

Generated code for this function uses a precompiled platform-specific shared library.

imextendedmax

Image Processing Toolbox

The optional third input argument, conn, must be a compile-time constant.

Generated code for this function uses a precompiled platform-specific shared library.

imextendedmin

Image Processing Toolbox

The optional third input argument, conn, must be a compile-time constant.

Generated code for this function uses a precompiled platform-specific shared library.

imfill

Image Processing Toolbox

The optional input connectivity, conn and the string 'holes' must be compile time constants.

Supports only up to 3-D inputs. (No N-D support.)

The interactive mode to select points, imfill(BW,0,CONN) is not supported in code generation.

locations can be a P-by-1 vector, in which case it contains the linear indices of the starting locations. locations can also be a P-by-ndims(I) matrix, in which case each row contains the array indices of one of the starting locations. Once you select a format at compile-time, you cannot change it at run-time. However, the number of points in locations can be varied at run-time.

Generated code for this function uses a precompiled platform-specific shared library.

imfilter

Image Processing Toolbox

The input image can be either 2-D or 3-D. The value of the input argument, options, must be a compile-time constant.

Generated code for this function uses a precompiled platform-specific shared library.

imhist

Image Processing Toolbox

The optional second input argument, n, must be a compile-time constant. In addition, nonprogrammatic syntaxes are not supported. For example, the syntaxes where imhist displays the histogram are not supported.

Generated code for this function uses a precompiled platform-specific shared library.

imhmax

Image Processing Toolbox

The optional third input argument, conn, must be a compile-time constant

Generated code for this function uses a precompiled platform-specific shared library.

imhmin

Image Processing Toolbox

The optional third input argument, conn, must be a compile-time constant

Generated code for this function uses a precompiled platform-specific shared library.

imopen

Image Processing Toolbox

The input image IM must be either 2-D or 3-D image. The structuring element input argument SE must be a compile-time constant.

Generated code for this function uses a precompiled platform-specific shared library.

imreconstruct

Image Processing Toolbox

The optional third input argument, conn, must be a compile-time constant.

Generated code for this function uses a precompiled platform-specific shared library.

imref2d

Image Processing Toolbox

The XWorldLimits, YWorldLimits and ImageSize properties can be set only during object construction. When generating code, you can only specify singular objects—arrays of objects are not supported.

imref3d

Image Processing Toolbox

The XWorldLimits, YWorldLimits, ZWorldLimits and ImageSize properties can be set only during object construction. When generating code, you can only specify singular objects—arrays of objects are not supported.

imregionalmax

Image Processing Toolbox

The optional second input argument, conn, must be a compile-time constant.

Generated code for this function uses a precompiled platform-specific shared library.

imregionalmin

Image Processing Toolbox

The optional second input argument, conn, must be a compile-time constant.

Generated code for this function uses a precompiled platform-specific shared library.

imtophat

Image Processing Toolbox

The input image IM must be either 2-D or 3-D image. The structuring element input argument SE must be a compile-time constant.

Generated code for this function uses a precompiled platform-specific shared library.

imwarp

Image Processing Toolbox

Geometric transformation object input, tform, must be either affine2d or projective2d. Additionally, the interpolation method and optional parameter names must be string constants.

Generated code for this function uses a precompiled platform-specific shared library.

ind2sub

MATLAB

inf

MATLAB

  • Dimensions must be real, nonnegative, integers.

insertMarker

Computer Vision System Toolbox

Compile-time constant input: marker
Supports MATLAB Function block: Yes

insertShape

Computer Vision System Toolbox

Compile-time constant input: shape and SmoothEdges
Supports MATLAB Function block: Yes

int8, int16, int32, int64

MATLAB

No integer overflow detection for int64 in MEX or MATLAB Function block simulation on Windows® 32-bit platforms.

int8int16int32int64

Fixed-Point Designer

integralImage

Computer Vision System Toolbox

Supports MATLAB Function block: Yes

interp1

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

interp2

MATLAB

  • Xq and Yq must be the same size. Use meshgrid to evaluate on a grid.

  • For best results, provide X and Y as vectors.

  • For the 'cubic' method, reports an error if the grid does not have uniform spacing. In this case, use the 'spline' method.

  • For best results when you use the 'spline' method:

    • Use meshgrid to create the inputs Xq and Yq.

    • Use a small number of interpolation points relative to the dimensions of V. Interpolating over a large set of scattered points can be inefficient.

interp3

MATLAB

  • Xq, Yq, and Zq must be the same size. Use meshgrid to evaluate on a grid.

  • For best results, provide X, Y, and Z as vectors.

  • For the 'cubic' method, reports an error if the grid does not have uniform spacing. In this case, use the 'spline' method.

  • For best results when you use the 'spline' method:

    • Use meshgrid to create the inputs Xq, Yq, and Zq.

    • Use a small number of interpolation points relative to the dimensions of V. Interpolating over a large set of scattered points can be inefficient.

intersect

MATLAB

  • When you do not specify the 'rows' option:

    • Inputs A and B must be vectors. If you specify the 'legacy' option, inputs A and B must be row vectors.

    • The first dimension of a variable-size row vector must have fixed length 1. The second dimension of a variable-size column vector must have fixed length 1.

    • The input [] is not supported. Use a 1-by-0 or 0-by-1 input, for example, zeros(1,0), to represent the empty set.

    • If you specify the 'legacy' option, empty outputs are row vectors, 1-by-0, never 0-by-0.

  • When you specify both the 'legacy' option and the 'rows' option, the outputs ia and ib are column vectors. If these outputs are empty, they are 0-by-1, never 0-by-0, even if the output C is 0-by-0.

  • When the setOrder is 'sorted' or when you specify the 'legacy' option, the inputs must already be sorted in ascending order. The first output, C, is sorted in ascending order.

  • Complex inputs must be single or double.

  • When one input is complex and the other input is real, do one of the following:

    • Set setOrder to 'stable'.

    • Sort the real input in complex ascending order (by absolute value). Suppose the real input is x. Use sort(complex(x))or sortrows(complex(x)).

intfilt

Signal Processing Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

intmax

MATLAB

intmin

MATLAB

inv

MATLAB

Singular matrix inputs can produce nonfinite values that differ from MATLAB results.

invhilb

MATLAB

ipermute

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

iptcheckconn

Image Processing Toolbox

All input arguments must be compile-time constants.

iqr

Statistics Toolbox

isa

MATLAB

iscell

MATLAB

ischar

MATLAB

iscolumn

MATLAB

iscolumn

Fixed-Point Designer

isdeployed

MATLAB Compiler™

  • Returns true and false as appropriate for MEX and SIM targets

  • Returns false for other targets

isempty

MATLAB

isempty

Fixed-Point Designer

isEpipoleInImage

Computer Vision System Toolbox

Compile-time constant input: No restrictions.
Supports MATLAB Function block: Yes

isequal

MATLAB

isequal

Fixed-Point Designer

isequaln

MATLAB

isfi

Fixed-Point Designer

isfield

MATLAB

  • Does not support cell input for second argument

isfimath

Fixed-Point Designer

isfimathlocal

Fixed-Point Designer

isfinite

MATLAB

isfinite

Fixed-Point Designer

isfloat

MATLAB

isinf

MATLAB

isinf

Fixed-Point Designer

isinteger

MATLAB

isletter

MATLAB

  • Input values from the char class must be in the range 0-127

islogical

MATLAB

ismac

MATLAB

  • Returns true or false based on the MATLAB version used for code generation.

  • Use only when the code generation target is S-function (Simulation) or MEX-function.

ismatrix

MATLAB

ismcc

MATLAB Compiler

  • Returns true and false as appropriate for MEX and SIM targets.

  • Returns false for other targets.

ismember

MATLAB

  • The second input, B, must be sorted in ascending order.

  • Complex inputs must be single or double.

isnan

MATLAB

isnan

Fixed-Point Designer

isnumeric

MATLAB

isnumeric

Fixed-Point Designer

isnumerictype

Fixed-Point Designer

isobject

MATLAB

ispc

MATLAB

  • Returns true or false based on the MATLAB version you use for code generation.

  • Use only when the code generation target is S-function (Simulation) or MEX-function.

isprime

MATLAB

  • The maximum double precision input is 2^33.

  • The maximum single precision input is 2^25.

  • The input X cannot have type int64 or uint64.

isreal

MATLAB

isreal

Fixed-Point Designer

isrow

MATLAB

isrow

Fixed-Point Designer

isscalar

MATLAB

isscalar

Fixed-Point Designer

issigned

Fixed-Point Designer

issorted

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

isspace

MATLAB

  • Input values from the char class must be in the range 0–127.

issparse

MATLAB

isstrprop

MATLAB

  • Supports only inputs from char and integer classes.

  • Input values must be in the range 0-127.

isstruct

MATLAB

istrellis

Communications System Toolbox

isunix

MATLAB

  • Returns true or false based on the MATLAB version used for code generation.

  • Use only when the code generation target is S-function (Simulation) or MEX-function.

isvector

MATLAB

isvector

Fixed-Point Designer

kaiser

Signal Processing Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

kaiserord

Signal Processing Toolbox

kron

MATLAB

kurtosis

Statistics Toolbox

label2rgb

Image Processing Toolbox

Referring to the standard syntax:

RGB = label2rgb(L, map, zerocolor, order)
  • Submit at least two input arguments: the label matrix, L, and the colormap matrix, map.

  • map must be an n-by-3, double, colormap matrix. You cannot use a string containing the name of a MATLAB colormap function or a function handle of a colormap function.

  • If you set the boundary color zerocolor to the same color as one of the regions, label2rgb will not issue a warning.

  • If you supply a value for order, it must be 'noshuffle'.

lcm

MATLAB

lcmvweights

Phased Array System Toolbox

Does not support variable-size inputs.

ldivide

MATLAB

le

MATLAB

le

Fixed-Point Designer

  • Not supported for fixed-point signals with different biases.

length

MATLAB

length

Fixed-Point Designer

levinson

Signal Processing Toolbox

lineToBorderPoints

Computer Vision System Toolbox

Compile-time constant input: No restrictions.
Supports MATLAB Function block: Yes

linsolve

MATLAB

  • The option structure must be a constant.

  • Supports only a scalar option structure input. It does not support arrays of option structures.

  • Only optimizes these cases:

    • UT

    • LT

    • UHESS = true (the TRANSA can be either true or false)

    • SYM = true and POSDEF = true

    Other options are equivalent to using mldivide.

linspace

MATLAB

load

MATLAB

  • Use only when generating MEX or code for Simulink simulation. To load compile-time constants, use coder.load.

  • Does not support use of the function without assignment to a structure or array. For example, use S = load(filename), not load(filename).

  • The output S must be the name of a structure or array without any subscripting. For example, S[i] = load('myFile.mat') is not allowed.

  • Arguments to load must be compile-time constant strings.

  • Does not support loading objects.

  • If the MAT-file contains unsupported constructs, use load(filename,variables) to load only the supported constructs.

  • You cannot use save in a function intended for code generation. The code generation software does not support the save function. Furthermore, you cannot use coder.extrinsic with save. Prior to generating code, you can use save to save the workspace data to a MAT-file.

    You must use coder.varsize to explicitly declare variable-size data loaded using the load function.

local2globalcoord

Phased Array System Toolbox

Does not support variable-size inputs.

log

MATLAB

  • Generates an error during simulation and returns NaN in generated code when the input value x is real, but the output should be complex. To get the complex result, make the input value complex by passing in complex(x).

log2

MATLAB

log10

MATLAB

log1p

MATLAB

logical

MATLAB

logical

Fixed-Point Designer

logncdf

Statistics Toolbox

logninv

Statistics Toolbox

lognpdf

Statistics Toolbox

lognrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

lognstat

Statistics Toolbox

logspace

MATLAB

lower

MATLAB

  • Supports only char inputs.

  • Input values must be in the range 0-127.

lowerbound

Fixed-Point Designer

lsb

Fixed-Point Designer

  • Supported for scalar fixed-point signals only.

  • Supported for scalar, vector, and matrix, fi single and double signals.

lt

MATLAB

lteZadoffChuSeq

Communications System Toolbox

lt

Fixed-Point Designer

  • Not supported for fixed-point signals with different biases.

lu

MATLAB

mad

Statistics Toolbox

Input dim cannot be empty.

magic

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

matchFeatures

Computer Vision System Toolbox

Generates platform-dependent library: Yes for MATLAB host. The function generates portable C code for non-host target.
Compile-time constant input: Method and Metric.
Supports MATLAB Function block: Yes
Generated code for this function uses a precompiled platform-specific shared library.

max

MATLAB

max

Fixed-Point Designer

maxflat

Signal Processing Toolbox

Inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

mdltest

Phased Array System Toolbox

Does not support variable-size inputs.

mean

MATLAB

mean

Fixed-Point Designer

mean2

Image Processing Toolbox

median

MATLAB

median

Fixed-Point Designer

meshgrid

MATLAB

mfilename

MATLAB

min

MATLAB

min

Fixed-Point Designer

minus

MATLAB

minus

Fixed-Point Designer

  • Any non-fi input must be constant. Its value must be known at compile time so that it can be cast to a fi object.

mkpp

MATLAB

  • The output structure pp differs from the pp structure in MATLAB. In MATLAB, ppval cannot use the pp structure from the code generation software. For code generation, ppval cannot use a pp structure created by MATLAB. unmkpp can use a MATLAB pp structure for code generation.

    To create a MATLAB pp structure from a pp structure created by the code generation software:

    • In code generation, use unmkpp to return the piecewise polynomial details to MATLAB.

    • In MATLAB, use mkpp to create the pp structure.

  • If you do not provide d, then coefs must be two-dimensional and have a fixed number of columns. In this case, the number of columns is the order.

  • To define a piecewise constant polynomial, coefs must be a column vector or d must have at least two elements.

  • If you provide d and d is 1, d must be a constant. Otherwise, if the input to ppval is nonscalar, the shape of the output of ppval can differ from ppval in MATLAB.

  • If you provide d, it must have a fixed length. One of the following sets of statements must be true:

    1. Suppose that m = length(d) and npieces = length(breaks) - 1.

      size(coefs,j) = d(j) 
      size(coefs,m+1) = npieces
      size(coefs,m+2) = order 

      j = 1,2,...,m. The dimension m+2 must be fixed length.

    2. Suppose that m = length(d) and npieces = length(breaks) - 1.

      size(coefs,1) = prod(d)*npieces
      size(coefs,2) = order             

      The second dimension must be fixed length.

  • If you do not provide d, the following statements must be true:

    Suppose that m = length(d) and npieces = length(breaks) - 1.

    size(coefs,1) = prod(d)*npieces
    size(coefs,2) = order

    The second dimension must be fixed length.

mldivide

MATLAB

mnpdf

Statistics Toolbox

mod

MATLAB

  • Performs the arithmetic using the output class. Results might not match MATLAB due to differences in rounding errors.

    If one of the inputs has type int64 or uint64, then both inputs must have the same type.

mode

MATLAB

moment

Statistics Toolbox

If order is nonintegral and X is real, use moment(complex(X), order).

mpower

MATLAB

mpower

Fixed-Point Designer

  • The exponent input, k, must be constant; that is, its value must be known at compile time.

  • Variable-sized inputs are only supported when the SumMode property of the governing fimath is set to Specify precision or Keep LSB.

  • For variable-sized signals, you may see different results between MATLAB and the generated code.

    • In generated code, the output for variable-sized signals is computed using the SumMode property of the governing fimath.

    • In MATLAB, the output for variable-sized signals is computed using the SumMode property of the governing fimath when both inputs are nonscalar. However, if either input is a scalar, MATLAB computes the output using the ProductMode of the governing fimath.

mpy

Fixed-Point Designer

  • Code generation in MATLAB does not support the syntax F.mpy(a,b). You must use the syntax mpy(F,a,b).

  • When you provide complex inputs to the mpy function inside a MATLAB Function block, you must declare the input as complex before running the simulation. To do so, go to the Ports and data manager and set the Complexity parameter for all known complex inputs to On.

mrdivide

MATLAB

mrdivide

Fixed-Point Designer

MSERRegions

Computer Vision System Toolbox

Compile-time constant input: No restrictions.
Supports MATLAB Function block: Yes
For code generation, you must specify both the pixellist cell array and the length of each array, as the second input. The object outputs, regions.PixelList as an array. The region sizes are defined in regions.Lengths.
Generated code for this function uses a precompiled platform-specific shared library.

mtimes

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

mtimes

Fixed-Point Designer

  • Any non-fi input must be constant; that is, its value must be known at compile time so that it can be cast to a fi object.

  • Variable-sized inputs are only supported when the SumMode property of the governing fimath is set to Specify precision or Keep LSB.

  • For variable-sized signals, you may see different results between MATLAB and the generated code.

    • In generated code, the output for variable-sized signals is computed using the SumMode property of the governing fimath.

    • In MATLAB, the output for variable-sized signals is computed using the SumMode property of the governing fimath when both inputs are nonscalar. However, if either input is a scalar, MATLAB computes the output using the ProductMode of the governing fimath.

mvdrweights

Phased Array System Toolbox

Does not support variable-size inputs.

NaN or nan

MATLAB

  • Dimensions must be real, nonnegative, integers.

nancov

Statistics Toolbox

If the input is variable-size and is [] at run time, returns [] not NaN.

nanmax

Statistics Toolbox

nanmean

Statistics Toolbox

nanmedian

Statistics Toolbox

nanmin

Statistics Toolbox

nanstd

Statistics Toolbox

nansum

Statistics Toolbox

nanvar

Statistics Toolbox

nargchk

MATLAB

  • Output structure does not include stack information.

    Note:   nargchk will be removed in a future release.

nargin

MATLAB

narginchk

MATLAB

nargout

MATLAB

  • For a function with no output arguments, returns 1 if called without a terminating semicolon.

    Note:   This behavior also affects extrinsic calls with no terminating semicolon. nargout is 1 for the called function in MATLAB.

nargoutchk

MATLAB

nbincdf

Statistics Toolbox

nbininv

Statistics Toolbox

nbinpdf

Statistics Toolbox

nbinrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

nbinstat

Statistics Toolbox

ncfcdf

Statistics Toolbox

ncfinv

Statistics Toolbox

ncfpdf

Statistics Toolbox

ncfrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

ncfstat

Statistics Toolbox

nchoosek

MATLAB

  • When the first input, x, is a scalar, nchoosek returns a binomial coefficient. In this case, x must be a nonnegative integer. It cannot have type int64 or uint64.

  • When the first input, x, is a vector, nchoosek treats it as a set. In this case, x can have type int64 or uint64.

  • The second input, k, cannot have type int64 or uint64.

  • Variable Sizing Restrictions for Code Generation of Toolbox Functions

nctcdf

Statistics Toolbox

nctinv

Statistics Toolbox

nctpdf

Statistics Toolbox

nctrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

nctstat

Statistics Toolbox

ncx2cdf

Statistics Toolbox

ncx2rnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

ncx2stat

Statistics Toolbox

ndgrid

MATLAB

ndims

MATLAB

ndims

Fixed-Point Designer

ne

MATLAB

ne

Fixed-Point Designer

  • Not supported for fixed-point signals with different biases.

nearest

Fixed-Point Designer

nextpow2

MATLAB

nnz

MATLAB

noisepow

Phased Array System Toolbox

Does not support variable-size inputs.

nonzeros

MATLAB

norm

MATLAB

normcdf

Statistics Toolbox

normest

MATLAB

norminv

Statistics Toolbox

normpdf

Statistics Toolbox

normrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

normstat

Statistics Toolbox

not

MATLAB

npwgnthresh

Phased Array System Toolbox

Does not support variable-size inputs.

nthroot

MATLAB

null

MATLAB

  • Might return a different basis than MATLAB

  • Does not support rational basis option (second input)

num2hex

MATLAB

numberofelements

Fixed-Point Designer

numberofelements will be removed in a future release. Use numel instead.

numel

MATLAB

numel

Fixed-Point Designer

numerictype

Fixed-Point Designer

  • Fixed-point signals coming into a MATLAB Function block from Simulink are assigned a numerictype object that is populated with the signal's data type and scaling information.

  • Returns the data type when the input is a nonfixed-point signal.

  • Use to create numerictype objects in the generated code.

  • All numerictype object properties related to the data type must be constant.

nuttallwin

Signal Processing Toolbox

Inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

ocr

Computer Vision System Toolbox

Compile-time constant input: TextLayout, Language, and CharacterSet.
Supports MATLAB Function block: No
Generated code for this function uses a precompiled platform-specific shared library.

ocrText

Computer Vision System Toolbox

Compile-time constant input: No restrictions.
Supports MATLAB Function block: No

ones

MATLAB

  • Dimensions must be real, nonnegative integers.

  • The input optimfun must be a function supported for code generation.

optimget

MATLAB

Input parameter names must be constant.

optimset

MATLAB

  • Does not support the syntax that has no input or output arguments:

    optimset

  • Functions specified in the options must be supported for code generation.

  • The fields of the options structure oldopts must be fixed-size fields.

  • For code generation, optimization functions ignore the Display option.

  • Does not support the additional options in an options structure created by the Optimization Toolbox™ optimset function. If an input options structure includes the additional Optimization Toolbox options, the output structure does not include them.

or

MATLAB

orth

MATLAB

  • Can return a different basis than MATLAB

padarray

Image Processing Toolbox

  • Support only up to 3-D inputs.

  • Input arguments, padval and direction are expected to be compile-time constants.

parfor

MATLAB

parzenwin

Signal Processing Toolbox

Inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

pascal

MATLAB

pchip

MATLAB

  • Input x must be strictly increasing.

  • Does not remove y entries with NaN values.

  • If you generate code for the pp = pchip(x,y) syntax, you cannot input pp to the ppval function in MATLAB. To create a MATLAB pp structure from a pp structure created by the code generation software:

    • In code generation, use unmkpp to return the piecewise polynomial details to MATLAB.

    • In MATLAB, use mkpp to create the pp structure.

pdf

Statistics Toolbox

permute

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

permute

Fixed-Point Designer

phased.ADPCACanceller

Phased Array System Toolbox

Code Generation

phased.AngleDopplerResponse

Phased Array System Toolbox

Code Generation

phased.ArrayGain

Phased Array System Toolbox

  • Does not support arrays containing polarized antenna elements, that is, the phased.ShortDipoleAntennaElement or phased.CrossedDipoleAntennaElement antennas.

  • Code Generation.

phased.ArrayResponse

Phased Array System Toolbox

Code Generation

phased.BarrageJammer

Phased Array System Toolbox

Code Generation

phased.BeamscanEstimator

Phased Array System Toolbox

Code Generation

phased.BeamscanEstimator2D

Phased Array System Toolbox

Code Generation

phased.BeamspaceESPRITEstimator

Phased Array System Toolbox

Code Generation.

phased.CFARDetector

Phased Array System Toolbox

Code Generation

phased.Collector

Phased Array System Toolbox

Code Generation

phased.ConformalArray

Phased Array System Toolbox

phased.ConstantGammaClutter

Phased Array System Toolbox

Code Generation

phased.CosineAntennaElement

Phased Array System Toolbox

phased.CrossedDipoleAntennaElement

Phased Array System Toolbox

phased.CustomAntennaElement

Phased Array System Toolbox

phased.CustomMicrophoneElement

Phased Array System Toolbox

phased.DPCACanceller

Phased Array System Toolbox

Code Generation

phased.ElementDelay

Phased Array System Toolbox

Code Generation

phased.ESPRITEstimator

Phased Array System Toolbox

Code Generation

phased.FMCWWaveform

Phased Array System Toolbox

Code Generation

phased.FreeSpace

Phased Array System Toolbox

phased.FrostBeamformer

Phased Array System Toolbox

phased.IsotropicAntennaElement

Phased Array System Toolbox

phased.LCMVBeamformer

Phased Array System Toolbox

Code Generation

phased.LinearFMWaveform

Phased Array System Toolbox

Code Generation

phased.MatchedFilter

Phased Array System Toolbox

phased.MVDRBeamformer

Phased Array System Toolbox

Code Generation

phased.MVDREstimator

Phased Array System Toolbox

Code Generation

phased.MVDREstimator2D

Phased Array System Toolbox

Code Generation

phased.OmnidirectionalMicrophoneElement

Phased Array System Toolbox

phased.PartitionedArray

Phased Array System Toolbox

phased.PhaseCodedWaveform

Phased Array System Toolbox

Code Generation

phased.PhaseShiftBeamformer

Phased Array System Toolbox

Code Generation

phased.Platform

Phased Array System Toolbox

Code Generation

phased.RadarTarget

Phased Array System Toolbox

Code Generation

phased.Radiator

Phased Array System Toolbox

Code Generation

phased.RangeDopplerResponse

Phased Array System Toolbox

  • The CustomRangeWindow and the CustomDopplerWindow properties are not supported.

  • Code Generation.

phased.RectangularWaveform

Phased Array System Toolbox

Code Generation

phased.ReceiverPreamp

Phased Array System Toolbox

Code Generation

phased.ReplicatedSubarray

Phased Array System Toolbox

phased.RootMUSICEstimator

Phased Array System Toolbox

Code Generation

phased.RootWSFEstimator

Phased Array System Toolbox

Code Generation

phased.ShortDipoleAntennaElement

Phased Array System Toolbox

phased.STAPSMIBeamformer

Phased Array System Toolbox

Code Generation

phased.StretchProcessor

Phased Array System Toolbox

Code Generation

phased.SubbandPhaseShiftBeamformer

Phased Array System Toolbox

Code Generation

phased.SteeringVector

Phased Array System Toolbox

Code Generation

phased.SteppedFMWaveform

Phased Array System Toolbox

Code Generation

phased.SumDifferenceMonopulseTracker

Phased Array System Toolbox

Code Generation.

phased.SumDifferenceMonopulseTracker2D

Phased Array System Toolbox

Code Generation.

phased.TimeDelayBeamformer

Phased Array System Toolbox

phased.TimeDelayLCMVBeamformer

Phased Array System Toolbox

phased.TimeVaryingGain

Phased Array System Toolbox

Code Generation.

phased.Transmitter

Phased Array System Toolbox

Code Generation.

phased.ULA

Phased Array System Toolbox

phased.URA

Phased Array System Toolbox

phased.WidebandCollector

Phased Array System Toolbox

phitheta2azel

Phased Array System Toolbox

Does not support variable-size inputs.

phitheta2azelpat

Phased Array System Toolbox

Does not support variable-size inputs.

phitheta2uv

Phased Array System Toolbox

Does not support variable-size inputs.

phitheta2uvpat

Phased Array System Toolbox

Does not support variable-size inputs.

physconst

Phased Array System Toolbox

Does not support variable-size inputs.

pi

MATLAB

pinv

MATLAB

planerot

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

plus

MATLAB

plus

Fixed-Point Designer

  • Any non-fi input must be constant; that is, its value must be known at compile time so that it can be cast to a fi object.

poisscdf

Statistics Toolbox

poissinv

Statistics Toolbox

poisspdf

Statistics Toolbox

poissrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

poisstat

Statistics Toolbox

pol2cart

MATLAB

pol2circpol

Phased Array System Toolbox

Does not support variable-size inputs.

polellip

Phased Array System Toolbox

Does not support variable-size inputs.

polloss

Phased Array System Toolbox

Does not support variable-size inputs.

polratio

Phased Array System Toolbox

Does not support variable-size inputs.

polsignature

Phased Array System Toolbox
  • Does not support variable-size inputs.

  • Supported only when output arguments are specified.

poly

MATLAB

polyarea

MATLAB

poly2trellis

Communications System Toolbox

polyder

MATLAB

The output can contain fewer NaNs than the MATLAB output. However, if the input contains a NaN, the output contains at least one NaN.

polyfit

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

polyint

MATLAB

polyval

MATLAB

polyvalm

MATLAB

pow2

Fixed-Point Designer

pow2db

Signal Processing Toolbox

power

MATLAB

  • Generates an error during simulation. When both X and Y are real, but power(X,Y) is complex, returns NaN in the generated code. To get the complex result, make the input value X complex by passing in complex(X). For example, power(complex(X),Y).

  • Generates an error during simulation. When both X and Y are real, but X .^ Y is complex, returns NaN in generated code. To get the complex result, make the input value X complex by using complex(X). For example, complex(X).^Y.

power

Fixed-Point Designer

  • The exponent input, k, must be constant. Its value must be known at compile time.

ppval

MATLAB

The size of output v does not match MATLAB when both of the following statements are true:

  • The input x is a variable-size array that is not a variable-length vector.

  • x becomes a row vector at run time.

The code generation software does not remove the singleton dimensions. However, MATLAB might remove singleton dimensions.

For example, suppose that x is a :4-by-:5 array and ppval(pp,0) returns a 2-by-3 fixed-size array. v has size 2-by-3-by-:4-by-:5. At run time, suppose that, size(x,1) =1 and size (x,2) = 5. In the generated code, the size(v) is [2,3,1,5]. In MATLAB, the size is [2,3,5].

prctile

Statistics Toolbox

  • Automatic dimension restriction

  • If the output Y is a vector, the orientation of Y differs from MATLAB when all of the following are true:

    • You do not supply the dim input.

    • X is a variable-size array.

    • X is not a variable-length vector.

    • X is a vector at run time.

    • The orientation of the vector X does not match the orientation of the vector p.

    In this case, the output Y matches the orientation of X not the orientation of p.

primes

MATLAB

  • The maximum double precision input is 2^32.

  • The maximum single precision input is 2^24.

  • The input n cannot have type int64 or uint64.

prod

MATLAB

projective2d

Image Processing Toolbox

When generating code, you can only specify singular objects—arrays of objects are not supported.

psi

MATLAB

pulsint

Phased Array System Toolbox

Does not support variable-size inputs.

qr

MATLAB

quad2d

MATLAB

  • Generates a warning if the size of the internal storage arrays is not large enough. If a warning occurs, a possible workaround is to divide the region of integration into pieces and sum the integrals over each piece.

quadgk

MATLAB

quantile

Statistics Toolbox

quantize

Fixed-Point Designer

quatconj

Aerospace Toolbox

Code generation for this function requires the Aerospace Blockset™ software.

quatdivide

Aerospace Toolbox

Code generation for this function requires the Aerospace Blockset software.

quatinv

Aerospace Toolbox

Code generation for this function requires the Aerospace Blockset software.

quatmod

Aerospace Toolbox

Code generation for this function requires the Aerospace Blockset software.

quatmultiply

Aerospace Toolbox

Code generation for this function requires the Aerospace Blockset software.

quatnorm

Aerospace Toolbox

Code generation for this function requires the Aerospace Blockset software.

quatnormalize

Aerospace Toolbox

Code generation for this function requires the Aerospace Blockset software.

radareqpow

Phased Array System Toolbox

Does not support variable-size inputs.

radareqrng

Phased Array System Toolbox

Does not support variable-size inputs.

radareqsnr

Phased Array System Toolbox

Does not support variable-size inputs.

radarvcd

Phased Array System Toolbox

Does not support variable-size inputs.

radialspeed

Phased Array System Toolbox

Does not support variable-size inputs.

rand

MATLAB

randg

Statistics Toolbox

randi

MATLAB

randn

MATLAB

random

Statistics Toolbox

randperm

MATLAB

range

Fixed-Point Designer

range2beat

Phased Array System Toolbox

Does not support variable-size inputs.

range2bw

Phased Array System Toolbox

Does not support variable-size inputs.

range2time

Phased Array System Toolbox

Does not support variable-size inputs.

rangeangle

Phased Array System Toolbox

Does not support variable-size inputs.

rank

MATLAB

raylcdf

Statistics Toolbox

raylinv

Statistics Toolbox

raylpdf

Statistics Toolbox

raylrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

raylstat

Statistics Toolbox

rcond

MATLAB

rcosdesign

Signal Processing Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

rdcoupling

Phased Array System Toolbox

Does not support variable-size inputs.

rdivide

MATLAB

rdivide

Fixed-Point Designer

real

MATLAB

real

Fixed-Point Designer

reallog

MATLAB

realmax

MATLAB

realmax

Fixed-Point Designer

realmin

MATLAB

realmin

Fixed-Point Designer

realpow

MATLAB

realsqrt

MATLAB

rectint

MATLAB

rectwin

Signal Processing Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

reinterpretcast

Fixed-Point Designer

rem

MATLAB

  • Performs the arithmetic using the output class. Results might not match MATLAB due to differences in rounding errors.

  • If one of the inputs has type int64 or uint64, then both inputs must have the same type.

removefimath

Fixed-Point Designer

repmat

MATLAB

repmat

Fixed-Point Designer

resample

Signal Processing Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

rescale

Fixed-Point Designer

reshape

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

reshape

Fixed-Point Designer

return

MATLAB

rng

MATLAB

  • For library code generation targets, executable code generation targets, and MEX targets with extrinsic calls disabled:

    • Does not support the 'shuffle' input.

    • For the generator input, supports 'twister', 'v4', and 'v5normal'.

    For these targets, the output of s=rng in the generated code differs from the MATLAB output. You cannot return the output of s=rng from the generated code and pass it to rng in MATLAB.

  • For MEX targets, if extrinsic calls are enabled, you cannot access the data in the structure returned by rng.

rocpfa

Phased Array System Toolbox
  • Does not support variable-size inputs.

  • The NonfluctuatingNoncoherent signal type is not supported.

rocsnr

Phased Array System Toolbox
  • Does not support variable-size inputs.

  • Does not support the NonfluctuatingNoncoherent signal type.

rootmusicdoa

Phased Array System Toolbox

Does not support variable-size inputs.

roots

MATLAB

rosser

MATLAB

rot90

MATLAB

rotx

Phased Array System Toolbox

Does not support variable-size inputs.

roty

Phased Array System Toolbox

Does not support variable-size inputs.

rotz

Phased Array System Toolbox

Does not support variable-size inputs.

round

MATLAB

round

Fixed-Point Designer

rsf2csf

MATLAB

schur

MATLAB

Can return a different Schur decomposition in generated code than in MATLAB.

sec

MATLAB

secd

MATLAB

sech

MATLAB

sensorcov

Phased Array System Toolbox

Does not support variable-size inputs.

sensorsig

Phased Array System Toolbox

Does not support variable-size inputs.

setdiff

MATLAB

  • When you do not specify the 'rows' option:

    • Inputs A and B must be vectors. If you specify the 'legacy' option, inputs A and B must be row vectors.

    • The first dimension of a variable-size row vector must have fixed length 1. The second dimension of a variable-size column vector must have fixed length 1.

    • Do not use [] to represent the empty set. Use a 1-by-0 or 0-by-1 input, for example, zeros(1,0), to represent the empty set.

    • If you specify the 'legacy' option, empty outputs are row vectors, 1-by-0, never 0-by-0.

  • When you specify both the 'legacy' and 'rows' options, the output ia is a column vector. If ia is empty, it is 0-by-1, never 0-by-0, even if the output C is 0-by-0.

  • When the setOrder is 'sorted' or when you specify the 'legacy' option, the inputs must already be sorted in ascending order. The first output, C, is sorted in ascending order.

  • Complex inputs must be single or double.

  • When one input is complex and the other input is real, do one of the following:

    • Set setOrder to 'stable'.

    • Sort the real input in complex ascending order (by absolute value). Suppose the real input is x. Use sort(complex(x))or sortrows(complex(x)).

setfimath

Fixed-Point Designer

setxor

MATLAB

  • When you do not specify the 'rows' option:

    • Inputs A and B must be vectors with the same orientation. If you specify the 'legacy' option, inputs A and B must be row vectors.

    • The first dimension of a variable-size row vector must have fixed length 1. The second dimension of a variable-size column vector must have fixed length 1.

    • The input [] is not supported. Use a 1-by-0 or 0-by-1 input, for example , zeros(1,0), to represent the empty set.

    • If you specify the 'legacy' option, empty outputs are row vectors, 1-by-0, never 0-by-0.

  • When you specify both the 'legacy' option and the 'rows' option, the outputs ia and ib are column vectors. If these outputs are empty, they are 0-by-1, never 0-by-0, even if the output C is 0-by-0.

  • When the setOrder is 'sorted' or when you specify the 'legacy' flag, the inputs must already be sorted in ascending order. The first output, C, is sorted in ascending order.

  • Complex inputs must be single or double.

  • When one input is complex and the other input is real, do one of the following:

    • Set setOrder to 'stable'.

    • Sort the real input in complex ascending order (by absolute value). Suppose the real input is x. Use sort(complex(x))or sortrows(complex(x)).

sfi

Fixed-Point Designer

  • All properties related to data type must be constant for code generation.

sgolay

Signal Processing Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

shiftdim

MATLAB

shnidman

Phased Array System Toolbox

Does not support variable-size inputs.

sign

MATLAB

sign

Fixed-Point Designer

sin

MATLAB

sin

Fixed-Point Designer

sind

MATLAB

single

MATLAB

single

Fixed-Point Designer

sinh

MATLAB

size

MATLAB

size

Fixed-Point Designer

skewness

Statistics Toolbox

sort

MATLAB

If the input is a complex type, sort orders the output according to absolute value. When x is a complex type that has all zero imaginary parts, use sort(real(x)) to compute the sort order for real types. See Code Generation for Complex Data.

sort

Fixed-Point Designer

sortrows

MATLAB

If the input is a complex type, sortrows orders the output according to absolute value. When x is a complex type that has all zero imaginary parts, use sortrows(real(x)) to compute the sort order for real types. See Code Generation for Complex Data.

sosfilt

Signal Processing Toolbox

speed2dop

Phased Array System Toolbox

Does not support variable-size inputs.

sph2cart

MATLAB

sph2cartvec

Phased Array System Toolbox

Does not support variable-size inputs.

spline

MATLAB

  • Input x must be strictly increasing.

  • Does not remove Y entries with NaN values.

  • Does not report an error for infinite endslopes in Y.

  • If you generate code for the pp = spline(x,Y) syntax, you cannot input pp to the ppval function in MATLAB. To create a MATLAB pp structure from a pp structure created by the code generation software:

    • In code generation, use unmkpp to return the piecewise polynomial details to MATLAB.

    • In MATLAB, use mkpp to create the pp structure.

spsmooth

Phased Array System Toolbox

Does not support variable-size inputs.

squeeze

MATLAB

sqrt

MATLAB

  • Generates an error during simulation and returns NaN in generated code when the input value x is real, but the output should be complex. To get the complex result, make the input value complex by passing in complex(x).

sqrt

Fixed-Point Designer

  • Complex and [Slope Bias] inputs error out.

  • Negative inputs yield a 0 result.

sqrtm

MATLAB

std

MATLAB

Variable Sizing Restrictions for Code Generation of Toolbox Functions

steervec

Phased Array System Toolbox

Does not support variable-size inputs.

stokes

Phased Array System Toolbox
  • Does not support variable-size inputs.

  • Supported only when output arguments are specified.

storedInteger

Fixed-Point Designer

storedIntegerToDouble

Fixed-Point Designer

str2func

MATLAB

  • String must be constant/known at compile time

strcmp

MATLAB

strcmpi

MATLAB

  • Input values from the char class must be in the range 0-127.

strel

Image Processing Toolbox

All input arguments must be compile-time constants. The following methods are not supported for code generation: getsequence, reflect, translate, disp, display, loadobj. When generating code, you can only specify singular objects—arrays of objects are not supported.

stretchfreq2rng

Phased Array System Toolbox

Does not support variable-size inputs.

strfind

MATLAB

  • Does not support cell arrays.

  • If pattern does not exist in str, returns zeros(1,0) not []. To check for an empty return, use isempty.

  • Inputs must be character row vectors.

strjust

MATLAB

strncmp

MATLAB

strncmpi

MATLAB

  • Input values from the char class must be in the range 0-127.

strrep

MATLAB

  • Does not support cell arrays.

  • If oldSubstr does not exist in origStr, returns blanks(0). To check for an empty return, use isempty.

  • Inputs must be character row vectors.

strtok

MATLAB

strtrim

MATLAB

  • Supports only inputs from the char class.

  • Input values must be in the range 0-127.

struct

MATLAB

structfun

MATLAB

  • Does not support the ErrorHandler option.

  • The number of outputs must be less than or equal to three.

sub

Fixed-Point Designer

Code generation in MATLAB does not support the syntax F.sub(a,b). You must use the syntax sub(F,a,b).

sub2ind

MATLAB

subsasgn

Fixed-Point Designer

subspace

MATLAB

subsref

Fixed-Point Designer

sum

MATLAB

sum

Fixed-Point Designer

  • Variable-sized inputs are only supported when the SumMode property of the governing fimath is set to Specify precision or Keep LSB.

surfacegamma

Phased Array System Toolbox

Does not support variable-size inputs.

surfclutterrcs

Phased Array System Toolbox

Does not support variable-size inputs.

SURFPoints

Computer Vision System Toolbox

Compile-time constant input: No restrictions.
Supports MATLAB Function block: No
To index locations with this object, use the syntax: points.Location(idx,:), for points object. See visionRecovertformCodeGeneration_kernel.mvisionRecovertformCodeGeneration_kernel.m, which is used in the Introduction to Code Generation with Feature Matching and Registration example.

svd

MATLAB

Uses a different SVD implementation than MATLAB. Because the singular value decomposition is not unique, left and right singular vectors might differ from those computed by MATLAB.

swapbytes

MATLAB

Inheritance of the class of the input to swapbytes in a MATLAB Function block is supported only when the class of the input is double. For non-double inputs, the input port data types must be specified, not inherited.

switch, case, otherwise

MATLAB

  • If all case expressions are scalar integer values, generates a C switch statement. At run time, if the switch value is not an integer, generates an error.

  • When the case expressions contain noninteger or nonscalar values, the code generation software generates C if statements in place of a C switch statement.

systemp

Phased Array System Toolbox

Does not support variable-size inputs.

tan

MATLAB

tand

MATLAB

tanh

MATLAB

taylorwin

Signal Processing Toolbox

Inputs must be constant

 Specifying constants

tcdf

Statistics Toolbox

tf2ca

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

tf2cl

DSP System Toolbox

All inputs must be constant. Expressions or variables are allowed if their values do not change.

time2range

Phased Array System Toolbox

Does not support variable-size inputs.

times

MATLAB

times

Fixed-Point Designer

  • Any non-fi input must be constant; that is, its value must be known at compile time so that it can be cast to a fi object.

  • When you provide complex inputs to the times function inside a MATLAB Function block, you must declare the input as complex before running the simulation. To do so, go to the Ports and data manager and set the Complexity parameter for all known complex inputs to On.

tinv

Statistics Toolbox

toeplitz

MATLAB

tpdf

Statistics Toolbox

trace

MATLAB

trapz

MATLAB

transpose

MATLAB

transpose

Fixed-Point Designer

triang

Signal Processing Toolbox

Inputs must be constant

 Specifying constants

tril

MATLAB

  • If supplied, the argument representing the order of the diagonal matrix must be a real and scalar integer value.

tril

Fixed-Point Designer

  • If supplied, the index, k, must be a real and scalar integer value that is not a fi object.

triu

MATLAB

  • If supplied, the argument representing the order of the diagonal matrix must be a real and scalar integer value.

triu

Fixed-Point Designer

  • If supplied, the index, k, must be a real and scalar integer value that is not a fi object.

trnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

true

MATLAB

  • Dimensions must be real, nonnegative, integers.

tstat

Statistics Toolbox

tukeywin

Signal Processing Toolbox

Inputs must be constant

 Specifying constants

typecast

MATLAB

ufi

Fixed-Point Designer

  • All properties related to data type must be constant for code generation.

uint8, uint16, uint32, uint64

MATLAB

No integer overflow detection for int64 in MEX or MATLAB Function block simulation on Windows 32-bit platforms.

uint8, uint16, uint32, uint64

Fixed-Point Designer

uminus

MATLAB

uminus

Fixed-Point Designer

unidcdf

Statistics Toolbox

unidinv

Statistics Toolbox

unidpdf

Statistics Toolbox

unidrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

unidstat

Statistics Toolbox

unifcdf

Statistics Toolbox

unifinv

Statistics Toolbox

unifpdf

Statistics Toolbox

unifrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

unifstat

Statistics Toolbox

unigrid

Phased Array System Toolbox

Does not support variable-size inputs.

union

MATLAB

  • When you do not specify the 'rows' option:

    • Inputs A and B must be vectors with the same orientation. If you specify the 'legacy' option, inputs A and B must be row vectors.

    • The first dimension of a variable-size row vector must have fixed length 1. The second dimension of a variable-size column vector must have fixed length 1.

    • The input [] is not supported. Use a 1-by-0 or 0-by-1 input, for example , zeros(1,0), to represent the empty set.

    • If you specify the 'legacy' option, empty outputs are row vectors, 1-by-0, never 0-by-0.

  • When you specify both the 'legacy' option and the 'rows' option, the outputs ia and ib are column vectors. If these outputs are empty, they are 0-by-1, never 0-by-0, even if the output C is 0-by-0.

  • When the setOrder is 'sorted' or when you specify the 'legacy' option, the inputs must already be sorted in ascending order. The first output, C, is sorted in ascending order.

  • Complex inputs must be single or double.

  • When one input is complex and the other input is real, do one of the following:

    • Set setOrder to 'stable'.

    • Sort the real input in complex ascending order (by absolute value). Suppose the real input is x. Use sort(complex(x))or sortrows(complex(x)).

unique

MATLAB

  • When you do not specify the'rows' option:

    • The input A must be a vector. If you specify the 'legacy' option, the input A must be a row vector.

    • The first dimension of a variable-size row vector must have fixed length 1. The second dimension of a variable-size column vector must have fixed length 1.

    • The input [] is not supported. Use a 1-by-0 or 0-by-1 input, for example, zeros(1,0), to represent the empty set.

    • If you specify the 'legacy' option, empty outputs are row vectors, 1-by-0, never 0-by-0.

  • When you specify both the 'rows' option and the 'legacy'option, outputs ia and ic are column vectors. If these outputs are empty, they are 0-by-1, even if the output C is 0-by-0.

  • When the setOrder is 'sorted' or when you specify the 'legacy' option, the input A must already be sorted in ascending order. The first output, C, is sorted in ascending order.

  • Complex inputs must be single or double.

unmkpp

MATLAB

  • pp must be a valid piecewise polynomial structure created by mkpp, spline, or pchip in MATLAB or by the code generation software.

  • Does not support pp structures created by interp1 in MATLAB.

unwrap

MATLAB

  • Row vector input is only supported when the first two inputs are vectors and nonscalar

  • Performs arithmetic in the output class. Hence, results might not match MATLAB due to different rounding errors

upfirdn

Signal Processing Toolbox

uplus

MATLAB

uplus

Fixed-Point Designer

upper

MATLAB

  • Supports only char inputs.

  • Input values must be in the range 0-127.

upperbound

Fixed-Point Designer

upsample

Signal Processing Toolbox

Either declare input n as constant, or use the assert function in the calling function to set upper bounds for n. For example,

assert(n<10)

uv2azel

Phased Array System Toolbox

Does not support variable-size inputs.

uv2azelpat

Phased Array System Toolbox

Does not support variable-size inputs.

uv2phitheta

Phased Array System Toolbox

Does not support variable-size inputs.

uv2phithetapat

Phased Array System Toolbox

Does not support variable-size inputs.

val2ind

Phased Array System Toolbox

Does not support variable-size inputs.

vander

MATLAB

var

MATLAB

vertcat

Fixed-Point Designer

vision.AlphaBlender

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Autocorrelator

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Autothresholder

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.BlobAnalysis

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.BoundaryTracer

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.CascadeObjectDetector

Computer Vision System Toolbox

Supports MATLAB Function block: No
Generated code for this function uses a precompiled platform-specific shared library.
System Objects in MATLAB Code Generation

vision.ChromaResampler

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.ColorSpaceConverter

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.ConnectedComponentLabeler

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Convolver

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.ContrastAdjuster

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Crosscorrelator

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.DemosaicInterpolator

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.DCT

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Deinterlacer

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Deployable

Computer Vision System Toolbox

Generates code on Windows host only.
Generated code for this function uses a precompiled platform-specific shared library.
System Objects in MATLAB Code Generation

vision.EdgeDetector

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.FFT

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.ForegroundDetector

Computer Vision System Toolbox

Supports MATLAB Function block: No
Generated code for this function uses a precompiled platform-specific shared library.
System Objects in MATLAB Code Generation

vision.GammaCorrector

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.GeometricRotator

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.GeometricScaler

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.GeometricShearer

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.GeometricTransformer

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.GeometricTranslator

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Histogram

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.HistogramBasedTracker

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.HistogramEqualizer

 

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.HoughLines

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.HoughTransform

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.IDCT

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.IFFT

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.ImageComplementer

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.ImageFilter

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.ImageDataTypeConverter

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.ImagePadder

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.KalmanFilter

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.LocalMaximaFinder

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.MarkerInserter

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Maximum

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Median

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.MedianFilter

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Mean

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Minimum

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.MorphologicalClose

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.MorphologicalDilate

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.MorphologicalErode

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.MorphologicalOpen

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.PeopleDetector

Computer Vision System Toolbox

Supports MATLAB Function block: No
Generated code for this function uses a precompiled platform-specific shared library.
System Objects in MATLAB Code Generation

vision.PointTracker

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.PSNR

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Pyramid

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.ShapeInserter

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.StandardDeviation

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.TemplateMatcher

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.TextInserter

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.Variance

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
System Objects in MATLAB Code Generation

vision.VideoFileReader

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
Generated code for this function uses a precompiled platform-specific shared library.
System Objects in MATLAB Code Generation

vision.VideoFileWriter

Computer Vision System Toolbox

Supports MATLAB Function block: Yes
Generated code for this function uses a precompiled platform-specific shared library.
System Objects in MATLAB Code Generation

wblcdf

Statistics Toolbox

wblinv

Statistics Toolbox

wblpdf

Statistics Toolbox

wblrnd

Statistics Toolbox

Can return a different sequence of numbers than MATLAB if either of the following is true:

  • The output is nonscalar.

  • An input parameter is invalid for the distribution.

wblstat

Statistics Toolbox

while

MATLAB

wilkinson

MATLAB

xcorr

Signal Processing Toolbox

xor

MATLAB

yulewalk

Signal Processing Toolbox

If specified, the order of recursion must be a constant. Expressions or variables are allowed if their values do not change.

 Specifying constants

zeros

MATLAB

  • Dimensions must be real, nonnegative, integers.

zp2tf

MATLAB

zscore

Statistics Toolbox

Was this topic helpful?