Getting Started with Autolev

To invoke Autolev:

On line (1), type
2 + 2
Press Enter, and observe Autolev's response.
Next, enter the symbolic expression [the asterisk symbol (*) signifies multiplication, and the caret symbol (^) exponentiation]
2*sin(t)^2 + cos(t)^2
Note Autolev's automatic simplification of the expression.
To perform a mathematical operation involving complex numbers, enter
(pi + 2*imaginary)^3.4
Autolev has extensive unit conversion capabilities.
To convert from inches to cm, enter
units(inches,cm)
To convert   3 slug ft2   to units of   kg cm2   and record the answer, enter,
conversionFactor = 3*units( slug*ft^2, kg*cm^2 )
Try some matrix commands by typing,
m = [1, 2;  3, T]
add  =   m  +  m
multiply  =   m * m
transpose  =   transpose(m)
inverse  =   inv(m)
determinant  =  det(m)
eigenvalues  =  eig(m)

Autolev has extensive symbolic capabilities.
For example, using either upper case or lower case letters (or a mixture of these, Autolev being case insensitive), enter

P = Expand( (1+T)*(2+T^2)*(3+T^3) )
Autolev's response to this input is
P = 6 + 6*T + T^5 + T^6 + 2*T^4 + 3*T^2 + 5*T^3
To differentiate P with respect to t, enter
DpDt = dt(p)
To determine the value of p for t=-7.3, issue the command
p73 = Evaluate(p, t=-7.3)
Autolev can solve sets of linear algebraic equations symbolically.
For example, given the equations,
     2*x + 3*y = sin(t)
     4*x + t*y = cos(t)
Autolev solves for x and y, when you type
Variables  x, y
Zero[1] = 2*x +  3*y  -  sin(t)
Zero[2] = 4*x +  5*y  -  cos(t)
Solve( Zero, x, y )

Saving and Running Autolev Files
To save the input commands from the current Autolev session, enter

SAVE  firstDemo.al
This causes a text file called firstDemo.al to be created in the current working directory.
Exit Autolev by typing
EXIT  or  QUIT
To re-run the file   firstDemo.al   (if you wish, you may first modify this file with a text editor), invoke Autolev and type
run  firstDemo.al
Alternatively, Windows, Unix, and Linux users may re-run this file by typing   al firstDemo.al   at the operating system prompt.

Saving Autolev Input and Responses
To save the input commands and Autolev's responses in the file firstDemo.all, enter

SAVE  firstDemo.all

Vector Operations
Operations involving vectors, such as multiplication of a vector with a scalar, dot-multiplication of vectors, cross-multiplication of vectors, and differentiation of a vector in a reference frame, can be performed symbolically or numerically with Autolev. For example, try typing the following in Autolev:

% File: vectorDemo.al                 % The percent sign denotes a comment
Frames A                              % Create unit vectors A1>, A2>, A3>
V> = 2*A1> + 3*A2> + 4*A3>            % Declare a vector V>
V5> = 5 * V>                          % Multiply V> by 5
magV = Mag( V> )                      % Compute the magnitude of V>
unitV> = UnitVec( V> )                % Create a unit vector in the direction of V>
W> = 6*A1> + 7*A2> + 8*A3>            % Declare a vector W>
addVW> = V> + W>                      % Add vectors V> and W>
dotVW = Dot( V>, W> )                 % Compute the dot product of V> and W>
crossVW> = Cross( V>, W> )            % Compute the cross product of V> and W>
crossWWV> = Cross( W>, Cross(W>,V>) ) % Compute W> X (W> X V>)
multVW>> = V> * W>                    % Form a dyadic by multiplying V> and W>
To save the input commands (for subsequent re-use) in the file vectorDemo.al, enter
SAVE  vectorDemo.al
To save the input commands and Autolev's responses in the file vectorDemo.all, enter
SAVE  vectorDemo.all
Exit Autolev by typing  EXIT  or  QUIT.

Kinematic Analysis
Autolev "knows" vector calculus and was specifically designed to facilitate kinematic and dynamic analyses.
For example, view and try out the kinematic analysis of a two-link manipulator.

Two Link Manipulator Schematic (Small)

Autolev can generate a Matlab, C, or Fortran program for:

For example, execution of the following Autolev input file leads to the creation of a C program that can be used to solve a nonlinear, inhomogeneous, third-order differential equation. Note: this file may be entered by invoking Autolev and typing each line or by using a text editor to create a file, e.g., firstCode.al and then invoking Autolev and typing  run firstCode.al.
% File: firstCode.al
% Note:    t is an independent variable, often used to denote time
% Note:    ' denotes differentiation with respect to t
Variables  w'''
Constants  A, B
w''' = cos(t) + A*sin(w) + B*w'
Input   A=1, B=2
Input   w=0, w'=1, w''=2
output  t, w, w', w'''
Code ode() firstCode.c
These instructions cause Autolev to place in the current working directory a C program called firstCode.c, a file called firstCode.dir that contains a list of the names and contents of the output files created when firstCode.c is executed, and a file called firstCode.in that serves as an input file for firstCode.c. After exiting from Autolev, compile, link, and execute firstCode.c, then examine the resulting file firstCode.1. The data in this file can be plotted by invoking Autolev's plotting program and following the on-screen instructions.

To produce a Fortran program rather than a C program, use the extension .f or .for instead of .c, e.g., firstCode.for. Similarly, to produce a Matlab program, use the .m extension. Because Autolev produces highly efficient C or Fortran code that can compiled and optimized for its host processor, firstDemo.exe runs very quickly. To try out various values of A and B, use a text editor to modify firstCode.in and then re-run the firstCode executable.

Online Help
Autolev provides comprehensive online help.
For example, for help with setting the name of the imaginary number, type

HELP IMAGINARY
For general Autolev help and contact information, type
HELP
For a list of Autolev commands, type
WHAT

Default Preferences
There are various default settings that effect Autolev's responses. To view the current default settings, type

DEFAULTS
To permanently change one or more of the default settings, use a text editor to change the setting in the file defaults.al, which resides in the directory toolbox (type HELP DEFAULTS for more information). Alternatively, a default setting can be changed for a session in progress by entering a new setting at any Autolev line prompt. For example, after invoking Autolev, type
DIGITS 3
To see that this changed the digit setting, type DEFAULTS and note that the current default setting of DIGITS is now 3. Next, enter
sin(pi/4) + exp(3) + cosh(2) + abs(-3)
and observe that the results are displayed with 3 significant digits (the accuracy of the calculations is not affected).