Main Content

quant

(To be removed) Discretize values as multiples of quantity

quant will be removed in a future release. For more information, see Transition Legacy Neural Network Code to dlnetwork Workflows.

For advice on updating your code, see Version History.

Syntax

quant(X,Q)

Description

quant(X,Q) takes two inputs,

X

Matrix, vector, or scalar

Q

Minimum value

and returns values from X rounded to nearest multiple of Q.

Examples

x = [1.333 4.756 -3.897];
y = quant(x,0.1)

Version History

Introduced before R2006a

collapse all