Despite the well-known benefits of physical units, matrices, and matrix alg
ebra in engineering computations, most engineering analysis packages are es
sentially dimensionless. They simply hold the engineer responsible for sele
cting a set of engineering units and making sure their use is consistent. A
lthough this practice may be satisfactory for the solution of established p
roblem-solving procedures, identifying and correcting unintentional errors
in computations developed by teams of engineers remains a difficult problem
unless units are an integral part of the computational procedure. This pap
er begins with a description of the data structures and algorithms needed t
o represent and manipulate physical quantity variables and matrices of phys
ical quantities. The result is a high-level scripting language that offers
enhanced type checking for expressions and assignments, automatic conversio
n of systems of units, and program control structures for the solution of e
ngineering problems. These ideas have been implemented in Aladdin, a new co
mputational environment for matrix and finite-element calculations. The cap
abilities of Aladdin are demonstrated through the deflection analysis of a
cantilever beam.