Sets the vertical (Y) units of a series.
SETVUNITS(series, "yunits", col)
series |
- |
Optional. Any series, table, or expression evaluating to a series or table. Defaults to the current Window. |
"yunits" |
- |
A string, the Y units. |
col |
- |
Optional. An integer, the column number. Defaults to 1, the first column. |
setvunits("Volts")
sets the vertical (Y) units of the series in the current Window to Volts.
myser = gnorm(1000, 1);
setvunits(myser, "Volts");
sets the vertical (Y) units of the series myser to Volts.
W1: gnorm(100, 1);setvunits("V")
W2: deriv(w1)
The units of W2 become V/s or Volts per seconds.
W3: gnorm(100, 1);setvunits("Kellicam")
W4: deriv(w3)
The units of W4 become Kellicam/s or Kellicams per seconds.
W1: randn(100, 3);setvunits("V", 1);setvunits("A", 2);setvunits("N", 3)
W2: col(w1, 1)
W3: col(w1, 2)
W4: col(w1, 3)
W1 contains a 10x3 random array. The vertical (Y) units of each column are individually set.
W2 contains column 1 of W1 where getvunits(w2) == "Volts".
W3 contains column 2 of W1 where getvunits(w3) == "Amps".
W4 contains column 3 of W1 where getvunits(w3) == "Newtons".
W1: randn(100, 3);setvunits("V", -1)
W2: col(w1, 1)
W3: col(w1, 2)
W4: col(w1, 3)
Similar to above, except all column vertical units are set to "Volts."
See UNITS for a list of supported units.
Compound vertical units are reduced in terms of known supported units. If the unit string is not internally defined (such as Grams), the string is still assigned to the vertical unit string, but further unit reduction is not performed, however unit expansion (e.g. Grams^2) will still occur.
Set col to -1 to set the vertical units of all the columns.
See DEFUNITS to define a unit with a specific expansion.