Skip to content

coder.varsize

coder · scripts/+coder/varsize.m

VARSIZE  MATLAB Coder compatibility: declare data to be variable-size

  CODER.VARSIZE('VAR1', 'VAR2', ...) declares one or more variables as
  variable-size arrays for code generation.

  CODER.VARSIZE('VAR1', 'VAR2', ..., UBOUND) also supplies an upper
  bound vector for every dimension.

  CODER.VARSIZE('VAR1', 'VAR2', ..., UBOUND, VARIABLEDIMS) also marks
  which dimensions vary (logical vector).

  CODER.VARSIZE('VAR1', 'VAR2', ..., [], VARIABLEDIMS) leaves the upper
  bound to be determined automatically.

  This is a code generation function.  It has no effect in MATLAB /
  Nexus: ordinary interpreted execution is a no-op, matching MATLAB
  R2026a toolbox/shared/coder/coder/lib/+coder/varsize.m.

  See also coder.typeof, coder.newtype, coder.unroll.