Skip to content

sdvt

Set or display the default value type (precision).

sdvt
sdvt(p)

Without an argument, prints the current default precision (the element type used for new arrays when no class is specified). With argument p (a string like 'double', 'single', 'int32', 'longdouble'), sets it. Affects subsequent calls to zeros, ones, rand, etc.

MathJet-specific.

sdvt('single') % default precision now single
sdvt % print current default
  • enable — Enable or disable a named interpreter feature.
  • cast — Convert an array to a different element type.