Next: 6.25 Class list
Up: 6.24 Class unit
Previous: 6.24.2 Attributes
Subsections
6.24.3.1 char
gives the unit's label (e.g. V for Volt) back.
6.24.3.2 dbref
returns reference value for 0 dB when calculating decibel values from data of this unit.
6.24.3.3 dbscale
returns scaling value when calculating decibel values from data of this unit.
dpscale returns either 10 (for power or energy units (e.g. Watt)) or 20 (for all other units (e.g. Volt).
6.24.3.4 display
6.24.3.5 double
gives a row vector which's first element contains the unit's factor
and the remaining elements contain the exponents of the SI basic units.
6.24.3.6 eq
6.24.3.7 exponents
returns dimension exponents of unit q.
6.24.3.8 factor
returns factor of unit q.
6.24.3.9 label
6.24.3.10 mpower
Syntax:
take unit u to power p, p must be a scalar.
6.24.3.11 mrdivide
6.24.3.12 mtimes
6.24.3.13 name
returns name of unit q.
6.24.3.14 quantity
returns quantity name of unit q.
If argument which is omitted, the english quantity name will be returned.
6.24.3.15 unit
unit class constructor
Class unit tries to modell physical units
a physical unit is mainly can be described by the exponents of the basic SI units,
namely mass, length, time, current, temperature, luminal_intensity, mole and
plane_angle.
Each unit belongs to a quantity, e.g. the unit s (second) is used
when measuring the quantity TIME.
Each unit has a name, e.g. 'Ampere', 'Volt' , 'Joule', 'hour', and
an abbreviation, called label ('A', 'V', 'J', 'h').
Unfortunately, the correspondence between these items is not always bijectiv
to find corresponding items, a table of units in the file units.mat is used.
A unit object can be created with different types of arguments:
- by giving the label: unit('Hz') looks up the remaining data (exponents, name,
quantity) in the table
by giving the exponents
Some arithmetic can be done with units:
- units can be multiplied unit('V') * unit('A') = unit('Watt')
- or taken to an integer or rational power unit('m')
Next: 6.25 Class list
Up: 6.24 Class unit
Previous: 6.24.2 Attributes
Contents
Copyright © 1997-2009 DPI Göttingen