Matvec Users’ Guide
Matvec Users' Guide
Matvec Users' Guide
- No tags were found...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Chapter 1<br />
A Tour of <strong>Matvec</strong><br />
1.1 Running <strong>Matvec</strong><br />
1.1.1 Interactively<br />
On most computer systems, <strong>Matvec</strong> can be invoked on your terminal by entering the shell command matvec.<br />
Then <strong>Matvec</strong> will start with an initial message similar to:<br />
matvec 0.01, University of Illinois<br />
type ? (or xman or help or xhelp) for on-line help<br />
and then a prompt ><br />
type a=[1,2,3].<br />
1.1.2 From a script<br />
next to the cursor. Now <strong>Matvec</strong> is ready for you to try something out. For instance,<br />
If you want to accomplish a little bit complicated job, then it is a better idea to write a script file using<br />
<strong>Matvec</strong> language. Suppose your script file named try.mv contains the following <strong>Matvec</strong> statements<br />
A = [3,2,1; 4,6,5; 7,8,9];<br />
A.det()<br />
Then you can type matvec try.mv at your computer system prompt to get the determinant of matrix A.<br />
You can also redirect the output from <strong>Matvec</strong> to a file using UNIX redirect mechanism. For instance, under<br />
C-shell, the command<br />
matvec try.me >try.out&<br />
will create a file try.out which contains standard output from <strong>Matvec</strong>. The last character & tells the computer<br />
to run <strong>Matvec</strong> in background.<br />
1.1.3 From standard input<br />
Try the following command at your computer system prompt:<br />
cat try.mv |matvec<br />
1.2 Special Attention<br />
There are a few of things to which you have to pay a special attention:<br />
• anything after # or // to the end of a line is treated as comments, thus ignored by <strong>Matvec</strong> interpreter.<br />
For multi-line comments, use /* ... */<br />
1