To invoke Autolev:
2 + 2Press 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)^2Note Autolev's automatic simplification of the expression. To perform a mathematical operation involving complex numbers, enter
(pi + 2*imaginary)^3.4Autolev 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^3To 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.alThis causes a text file called firstDemo.al to be created in the current working directory. Exit Autolev by typing
EXIT or QUITTo 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.alAlternatively, Windows, Unix, and Linux users may re-run this file by typing
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.alTo save the input commands and Autolev's responses in the file vectorDemo.all, enter
SAVE vectorDemo.allExit Autolev by typing
|
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. |
Autolev can generate a Matlab, C, or Fortran program for:
% 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.cThese 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 IMAGINARYFor general Autolev help and contact information, type
HELPFor 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
DEFAULTSTo 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 3To 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).