next up previous contents
Next: Design and implementation issues Up: MatPy Matrix Previous: Imported names in matpy   Contents

A dedicated interactive console

You can start the whole thing by simply typing matpy.py in a shell which starts python and does the necessary imports and implements some other goodies. Excerpt from the author (Henning Schroeder):

``... In order to play with your package I hacked together a small interactive console so that you can quickly enter expressions without caring about importing all the stuff etc. Additionally I added a small help system and a history (with load and save). ...''

Currently the lookfor function is not implemented.

An example session follows
$ matpy.py

Python 1.5.2 (#1, Sep 17 1999, 20:15:36)  [GCC egcs-2.91.66 19990314/Linux (egcs- (<MatPy-console>)
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam

    Command completion bound to tab.  You can change it to C-g by typing
    readline.parse_and_bind('C-g: complete')
    
You are working in MatPy mode! Type help to get started
>>> help
Type 
    help(function)   to get more information on a special function 
    lookfor(name)    to search the help for name
    functions        to see a list of available functions

    log_on()         to start logging
    log_off()        to stop logging
    dump()           to show the history
    load('filename') to load filename
    save('filename') to save filename

    CTRL-D to exit

It is recommed to read the included documentation so that you understand
the way MatPy works.
>>> help(Matrix)
Matrix class similar to matlab
>>> functions
Matrix_c, Matrix_r, Mrange, abs, acos, acosm, approx_real, arange, asin,
asinm, atan, atanm, cdf_g, cdfc_g, ceil, compactAxes, cos, cosh, coshm,
cosm, cov, cumprod, cumsum, diag, diff, efunc, eig, erf, exp, expm, eye,
floor, format, formatC, lgam, log, log10, logm, long, longC, max, mean,
median, mfunc, mfuncC, mfunc_p, min, mnorm, norm, ones, pdf_g, prod, ptp,
rand, repr, reprC, short, shortC, sign, sin, sinc, sinh, sinhm, sinm, size,
solve, sort, sqrt, sqrtm, std, str, strC, sum, sums, svd, tan, tanh, tanhm,
tanm, to_Matrix, to_array, to_number, trapz, wait, zeros



Huaiyu Zhu
2002-03-23