Make independent copy of quantizer object


q1 = copyobj(q)
[q1,q2,...] = copyobj(obja,objb,...)


q1 = copyobj(q) makes a copy of quantizer object q and returns it in q1.

[q1,q2,...] = copyobj(obja,objb,...)copies obja into q1, objb into q2, and so on.

Using copyobj to copy a quantizer object is not the same as using the command syntax q1 = q to copy a quantizer object. quantizer objects have memory (their read-only properties). When you use copyobj, the resulting copy is independent of the original item; it does not share the original object's memory, such as the values of the properties min, max, noverflows, or noperations. Using q1 = q creates a new object that is an alias for the original and shares the original object's memory, and thus its property values.


q = quantizer([8 7]);
q1 = copyobj(q)

See Also

| |

Introduced before R2006a

Was this topic helpful?