Getting Started with
Computing in Economics

- last updated July 23, 2009 -


Access to MTSU's computing facilities and what is available

What programs should I consider?

General purpose programs

Programs to work on Frank and to move files to and from Frank

Math programs

Programs to produce good-looking equations and text

Statistics/Econometrics programs

Mapping and Visualization

How do I run programs that are located on Frank?

Accessing programs on Frank via PUTTY

Accessing programs on Frank via PUTTY and Xming

How do I set up the X-Windows program Xming on my PC?

Moving files to and from Frank

Moving binary files with FTP

ASCII files can be edited and moved with Crimson Editor

Using Microsoft Internet Explorer to move files to and from Frank

Learning Maple

Basics

Installing packages

Running the content of a Maple mws/mw file in batch mode

 


Access to MTSU's computing facilities and what is available

1. You need a Frank account id and a password. You should have received both with your registration. See the Student Information Technology Handbook on this. Frank is the name of the Hewlett Packard 9000 Unix computer that is the main academic file server at MTSU. You will do much work on Frank. That means you will need to know a few Unix commands to be able to get things done. For a brief summary, I recommend that you print out and keep handy the Unix Commands Reference Card.

2. Whether you are working on Frank from a PC at MTSU or from a PC at home, either way you will need to become familiar with a number of programs that will allow you to do your work. If you want to set up your own PC, you will need to think about acquiring and installing a number of program. The programs that you will need to use and potentially buy will be discussed in some detail below. After that, I will go through some examples on how to log on to Frank and call up some programs.

On Frank, the following major programs are of interest for graduate students in economics/finance:

3. As an MA or Ph.D. student, your best bet to do serious work on a PC or on Frank at MTSU is by using one of the 8 PCs plus server in the graduate PC lab in room BAS N304. You will need a key from the department secretary to gain access. All of these PCs have an Internet connection, allow access to Frank, and have a number of core programs installed. In particular, each one of the 8 PCs has at least the following programs installed:

5 of the 8 PCs have copies of the following software:

back to Table of Contents

 

What programs should I consider?

The description below goes by the assumption that you want to conduct much of your work at your computer at home or on your labtop. Since the Business School computer lab lab tends to be busy, noisy, and not conducive to thinking, the only viable option is to work at one of the computers in the Ph.D. lab on the third floor of BAS (N304). Here you can get something done and also potentially get answers to your questions from your fellow students. In what follows, I will discuss what you should consider if you want to stock your own PC. Much of what is discussed is of interest even if you tend to work in the Ph.D./graduate lab in N304 because it provides an overview of what programs you will need to be familiar with as you go through the program.

The minimum configuration that will allow you to get through a graduate degree in economics depends on whether you have a dial-up Internet connection or a high-speed broad-band connection (cable or DSL). If you have a dial-up connection, the slow access speed will mean that you will likely need to spend several hundred dollars on programs if you have a MS Windows computer; alternatively, you can switch to a Linux distribution, such as Ubuntu or Quantian, and spend next to nothing on software. If you have a high-speed connection, you can save some money because you can connect to MTSU's Frank computer and use the programs installed on Frank remotely via your broadband connection. But do not expect all programs to run as fast as if you had them running on your own computer.

I assume in what follows that you have an Internet broadband connection. If you do not have a broadband connection, you can still connect to MTSU's Frank server and do some useful work via a telnet/putty connection. Just do not expext a graphical Windows-like point and click interface. The official Student Information Technology Handbook at MTSU will give you enough information on connecting via telephone modem directly to Frank in case you are not currently connected via broadband. This handbook also provides some other useful information, such as how to deal with Frank's Unix operating system. If you want to know more about the Unix language, please consult an online source such as this Unix Introduction or select one of the Unix links on this site.

Note that the discussion that follows is specific to computers running Microsoft Windows. If you have a different operating system, such as a MAC OS, or LINUX, you will be on your own in finding the equivalent programs that fit your machine configuration. However, this should not discourage you from choosing a non-Windows environment for your computing, especially if you are short on money. In fact, you can download ready-to-run free-of-charge Linux distributions with thousands of programs that allow you to do everything that is described below and more. Getting familiar with Linux also has the advantage that the command and file structure is effectively the same as on MTSU's Frank computer. Linux and Unix are very close cousins. If you are new to Linux, please consider one of the many LIVE-CD or LIVE-DVD distributions that boot up from a CD or DVD drive in almost any PC and do not touch the harddisk. Hence, you cannot mess up the operating system that is installed on the computer. All that you need for your work is a USB flash drive to save your work and configuration. In order to run these LIVE-Linux distributions you will need to change the boot order of your PC. It needs to first boot from the CD or DVD drive, not from a floppy, and not from the hard drive. Many of the Live-CD or DVD distributions can be loaded on a harddrive to replace Windows as your standard operating system. Ubuntu is the distribution that is by far the easiest to deal with. If you want a ready to run distro with many math and stat programs on a DVD, get the Quantian Scientific Computing Environment. Make sure you download the English versions of the respective "iso" (image) files and then create the bootable CD or DVD using the "Burn Image" option of your CD/DVD writing software. If you have trouble downloading the latest version of Quantian, simply provide me with a DVD and I will copy the iso file on it so your Quantian Linux is ready to run.

Additional information on programs that are useful for economists and are available for Linux as well as Windows is provided here.

back to Table of Contents

 

General purpose programs

a. Consider an Internet browser that is relatively safe and eliminates pop-ups. Mozilla Firefox appears to work well in this respect, is available free of charge, and nicely transfers bookmarks and other settings from your present browser. So you do not have to redo everything. However, you can, of course, continue with the browser that you are currently using.

b. An Office Suite, with word processor, spreadsheet, and presentation software. Most people use the Microsoft Office Suite. If you want to buy it, make sure that you take advantage of your status as a student and get the academic version. It saves you a lot of money. For example, take a look at the offering at Amazon which is less than $130. If you would rather not spend that much money on an office suite, you can download Open Office free of charge. This office suite is quite good and pretty compatible with Microsoft Office.

c. Adobe Acrobat is essential to read files on the Internet and to communicate with people that use different word processors and other programs. Acrobat Reader is available free of charge from Adobe. However, for all practical purposes, the free reader will not get you through your graduate program. You will also want to produce Acrobat files. You can do that if you download and install the free software pdfcreator. If you want to mark up or edit PDF files, you will need the full version of Acrobat. Again, an academic pricing scheme is available. Prices run between $90 and $99 for the standard version. It is unlikely that you will need the more expensive professional version. Once in a while, rebates are available, which can save you up to $30. Use an Internet search engine to search for "Adobe Acrobat Academic" or ask at MTSU's bookstore. They can also get you the academic program version of Acrobat.

d. Since I assume that you are connected to the Internet, you will have an Email program, such as Outlook Express up and running, and you have an email address given to you by your ISP. One option is to continue using your personal email account and your email address and forget about the email address provided to you by MTSU upon registration. If you take this option, just make sure that your instructors know from day one how you can be reached by email!! Another option is to use your MTSU email account for all your school work to completely separate school email from private email. To accomplish this, you could add another Inbox to your existing email program. This would typically be an IMAP as opposed to a POP3 connection if you have a broadband connection. It would connect to imap.mtsu.edu. If you do not want to bother with adding another Inbox to your email program, you can use the Internet to access your MTSU mail box. Simply direct your Internet browser to webmail.mtsu.edu and log into your Frank account, the one that you also use for computations. Then you can access your MTSU mail, compose new messages, and even attach files that are located on your home computer. This way, you can access and send email from an Internet connection anywhere in the world. Just make sure that you delete old messages (EMPTY TRASH) so your Inbox on the MTSU email server will not exceed the harddisk space quota allocated to you! In that case, all email to you is blocked. This last point is very important to remember!!! Make sure you promptly remove new incoming mail from Frank to a local folder on your harddrive. This is easy to accomplish in most email programs. Get familiar with how to do this promptly.

e. Internet security programs play an increasingly important role given the constant threat of electronic attack through viruses and the likes. You do not want to become known for spreading viruses to instructors or fellow students by carelessly neglecting basic security precautions. You also want to make sure that all your work on your computer is not wiped out by some undetected virus or other avoidable problem. You should consider the following precautionary measures: (i) Log onto www.microsoft.com and check for security updates for your Windows program. This is an indispensable security measure. Do this every week and download and install all critical updates. You will need to use Internet Explorer for this operation. Mozilla Firefox will not work for Windows updates. (ii) Install an antivirus program. There are some free programs out there. A good choice is AVAST. (iii) Back up all your work on a rewritable CD or DVD every week or two. Hard disk crashes do happen, typically when you least expect them. Leave a copy of your work some place other than your home, just in case. (iv) Install on your computer a program to remove ad-ware. These are markers left on your computer by web pages you visit. There are companies that check these markers on your computer without your knowledge to collect information about your computer habits. By running an ad-aware program once a week or so, you can eliminate this nuisance and also keep your computer from slowing down over time. Try either Spybot or Ad-aware. Both are free of charge for personal use. (v) Check to what extent your computer is vulnerable to attack over the Internet. This is particularly important if you are continually connected via cable or DSL. Firewalls can eliminate the threat from the internet. However, they also make it much more difficult to communicate with Frank if you intend to use an X-Windows program (see discussion below). There are numerous firewalls available: Zone Alarm, Tiny Firewall, and Sygate Firewall. They are all free of charge for personal use.

back to Table of Contents

 

Programs to work on Frank and to move files to and from Frank

a. An FTP (File Transfer Protocol) program allows you to move files from your computer to your Frank account and vice versa. Consider the WS-FTP program that is free of charge for academic use. This program is helpful, for example, when you spend much time on preparing input files for a program that you may not have on your home computer, such as the statistical package SAS. Instead of working on your files online and editing them with a file editor on Frank that you are not familiar with or do not like, you can make use of the familiar programs that you have on your home computer to edit your input files. As a note: MS Word is not a useful editor for programs such as SAS, TSP, RATS, etc because the program inserts all sorts of codes into the file that cause errors in other programs! Crimson Editor is a better and free alternative. After you are done editing a file on your PC, you would use the FTP program to transfer the file back to Frank to submit it to a program such as SAS. If you use Crimson Editor as your file editing program, you can ftp your file directly to Frank or retrieve a file from Frank, all without ever leaving the editor. As a final note: the ftp program does not submit input files to such programs as SAS. You will need to use a program other than FTP. This is discussed next. Note that FTP is also indispensible when you want to set up your own web site because you will need to upload files from your computer to Frank or wherever you decide to place your web site. Finally, FTP is also a very useful program to create and delete subdirectories in your Frank account, to change the names of files and directories, to delete files, or just to move around your Frank account to see what is there.

b. To work on your Frank account, that is, to run programs, or to create, edit, or delete program files, you will need a PC program that converts your home computer into a remote terminal for Frank. There are two choices you have, a teletype (non-graphical) user interface or a graphical user interface. The teletype connection via the Telnet program is not available any longer because of security reasons. You will need to use the secure alternative putty. Putty allows some limited cut and paste operations similar to those on your Windows PC. The big disadvantage of Putty: you cannot see any useful graphical output on your screen from any of the programs running on Frank. To get a graphical interfact, you will need to supplement it with an X-Windows program as in the next section below. Putty by itself is typically used to run Frank programs in batch mode. Batch mode means that you submit a program input file that contains all commands for the program you are using (possibly hundreds of commands). After the program has run, you can look at the results and/or the error messages in the output file that was created by the Frank program. When you are running large programs, batch mode is often preferred over interactive mode in a GUI environment because you can easily correct a mistake and resubmit your complete program in very little time. To get graphical output from batch files, you will typically have to write some program code to make the Frank program dump a graphical output file onto your Frank account. The code differs from program to program. The graphics output file needs to be transferred via FTP to your home computer and loaded into an appropriate program, such as Microsoft Word, before you know how the graph looks like. If you would rather see a graph on the screen as you are running a Frank program, you will again need to use a GUI interface to interact with Frank. These GUI interfaces are known as X-Windows programs. More on that in the next section.

c. X-Windows programs simulate a Windows like graphical user interface on your PC while you are connected to Frank or other Unix/Linux machines. I do not recommend them if you have a dial-up connection to your ISP because the transfer of graphics takes some time even on a high-speed cable connection. Even with a cable connection, some programs, such as the latest version of Maple, are exceedingly slow to the point of making it impossible to do any useful work. Other programs, such as Stata have a useful response rate that will allow you to get work done. However, the response rate is still less than what you get when you connect to Frank from any of the PCs in the Ph.D. lab, the library, or your laptop with a wireless connection to the MTSU network. There are several X-Windows implementations available outside of the commercial progam called EXCEED, which used to be the standard X-Windows interface on MTSU PCs but is now slowly being replaced by the free X-Windows program XMing. It is highly recommended that you install it on your personal computer. Instructions on that are provided further below.

back to Table of Contents

 

Math programs

As you are going through ECON 6100 and other courses in the graduate program, you will find it helpful to have at your disposal a computer program that can deal with numeric or symbolic math problems. Click here for an overview of these types of packages and additional links. Two of the most popular and powerful commercial packages are implemented on Frank: Maple and Mathematica. Mathmatica, however, is best used locally on the computers of the Ph.D./graduate student lab on the third floor of BAS (N304).

There are many online sources that get you started in the use of both packages. The Maple and the Mathematica web sites are very good starting points to look for applications. Both packages also have special pricing for students, at around $100 for Maple and at $140 for Mathematica in case you do not want to bother with internet connections to Frank. In the Econ 6100 class, only Maple will be used or referred to.

If you would rather not spend any money on computer algebra software, Maxima is a good choice. Maxima is a powerful and reliable program that is available for free. It is based on the discontinued Macsyma program originally developed at MIT and it is very similar in its command structure to Maple. As of late, it has become even more userfriendly because of the GUI frontend called wxmaxima. Wxmaxima turns Maxima almost into a point and click math program. It is highly recommended for all who do not buy the student version of Maple. Download the complete Maxima/Wxmaxima package from here.

Think of Maple and Mathematica as symbolic calculators that allow you to differentiate, integrate, solve equations etc. Another set of math packages are designed more with numerical calculations rather than symbolic manipulations in mind. Matlab is the foremost commerical package in this category. It is available on 5 computers of the Ph.D./graduate student lab but also on Frank. It is very popular in quantitative macroeconomics. As for what you will need to do in macroeconomics, you may also eventually take a look at the program Dynare, which allows you to solve stochastic dynamic general equilibrium models without too much fuss.There is also GAMS, which stands for General Algebraic Modeling System. It is popular with economists working with applied computable general equilibrium models. You can also access this package from Frank.

Since Matlab is expensive, few students end up buying it. Most load a Matlab clone on their computer. Its name is Octave. Most Matlab programs run in Octave, except those that require special Matlab add-on packages. Not quite as close to Matlab is Scilab. However, with a little work, it can also be a very useful substitute for Matlab. And there are plenty of free packages or toolboxes available. Finally, there is Euler, a small nifty Matlab-like package, also free of charge.

Just to check whether you differentiated correctly, you do not need any program other than a web browser. Numerous web sites with online solvers and other tools allow you to type in your problem and get an instantaneous answer. Math.com provides just one example of this concept, two others are Webmath.com and quickmath.com. This way, you can also get graphs produced online, which you can paste directly into your documents. For example, the following graph is a plot of and was produced by pasting it from quickmath.com. Quickmath.com is also a highly recommended web site to practice your math abilities!

More complicated graphs can be produced this way too. See, for example, the graph of the three equations,

 

back to Table of Contents

 

Programs to produce good-looking equations and text

Sooner or later you will run into the problem that you have to produce papers that contain a fair amount of equations. Ordinary word processors are not very good at equations. They need extra help. This also applies to Microsoft Word. When you installed Microsoft Office, you are likely to have chosen the "standard install" option. This automated installation mode, however, leaves off the equation editor. Hence, you will have to reinsert the installation CD and add the installation of the equation editor. Once the equation editor is installed, you should use it for all your math! After a while, however, you may discover that the equation editor provided on the Office CD is rather basic and that you would rather have something that is a bit more sophisticated. The solution comes from the same company that produced the simple equation editor for Microsoft. Mathtype is the name of the expanded equation editor for Word and all the other Microsoft Office programs. In other words, this equation editor works in all Office products the same way, including Powerpoint, presentation program. The program is not free of charge, but an academic discount is available.

As you go through the graduate program, you may notice at some point that some of your instructors and fellow students at MTSU or at other universities produce printed output of technical papers that look perceptively better than anything that you have been able to produce with Word and the equation editor. Most likely you have seen output from a TeX or LaTeX program. These are mark-up writing programs that have text attribute codes embedded in the text to identify the formatting that is to be done by a separate compiler. These programs take a little getting used to since they are typically not of the what-you-see-is-what-you-get type, such as Microsoft Word. They are more like the early wordprocessors on mainframe computers in the late 1970s and early 1980s, such as IBM-Script, that also required two steps: first write an ascii file with typesetting commands, then submit it to a compiler to get the typeset output. If you are a techie and want to spend no money on a TeX program, check out the TeX for Windows web page. MikTeX is the free TeX version that is recommended by most users of TeX. Typically, it is used in conjunction with a LaTeX front-end editor, such as WinEdt, a powerful editor that is meant to work nicely with MikTeX. WinEdt is on each of the computers in the Ph.D. lab. But there are many other useful LaTeX editors that work with MikTeX and that do not cost anything. Lyx is an example. Sooner or later, you also want to look at the TeX Archive CTAN.

If you really would like to work with LaTeX but also absolutely do not want to give up a "What-you-see-is-what-you-get" front-end, then I suggest that you download and install a recently developed Windows port of TexMacs. This program is quite a bit slower to operate than WinEdt but it almost works like Microsoft Word. One downside: it is not 100 percent compatible with MikTex or with Scientific Word, the software that is discussed next. You will have to do some adjusting as you move from one to the other.

If you rather pay some money to avoid most of the technical stuff or glitches of TexMacs, then you should look at Scientific Word from MacKichan Software. Note that this program has no association with Microsoft or its Word program. Scientific Word is easier to use than MiKTeX because you can generally avoid dealing with formatting codes in the text. However, unlike TexMacs it still requires two steps: writing (with clicking on formatting icons) and compiling. Only after the second step do you see how your writing looks when typeset and printed. Scientific Word is quite expensive, even for students ($170). When you consider this option, you might as well consider adding another $75 to move to Scientific Workplace. This program by MacKichan Software adds a powerful computer algebra system (MuPad), which is similar to Maple, to the LaTeX implementation of Scientific Word. This allows you, for example, to type an equation into your document, leave the cursor on it, hit a solve button, and then get the solution to the equation right in your document. This convenience will cost you $245. It will give you a word processor that can handle difficult math with ease and looks very professional.

back to Table of Contents

 

Statistics/Econometrics programs

As you will discover early on in your graduate study, economics does not only require a heavy dose of mathematics but an equal if not larger dose of statistical methods. In fact, much of economics is inconceivable without recourse to the analysis of data using statistical methods. If you would like to have access to an online easy-to-read overview of statistical techniques, bookmark this site.

There is a fair number of programs available on Frank that allow you to do your statistical work. MTSU's Office of Information Technology provides a brief overview of what is available. However, this list is somewhat outdated and therefore not complete. It also does not mention the programs that you find in the Ph.D. lab in BAS - third floor. Additionaly, there is a large number of statistical programs available on the Internet (see also here). This is not the place to go through all of the available programs. Let me just mention a few points that one needs to understand to avoid getting overwhelmed.

(i) SAS is a general purpose statistical program that has been extended over the years in all sorts of directions. You will need to become familiar with it since several instructors use it. You can invoke SAS on Frank simply by typing "sas". This will work both in Putty and in X-Windows mode. The full documentation for SAS is available on the SAS web site.

(ii) STATA is a more limited general purpose package that is also available on Frank and is in active use in the economics department. Use "stata" in Putty and "xstata" if XMing is up and running. The xstata version is point and click and, therefore, provides a good overview of what is available. Make use of its help facility to learn more. The following introduction may be helpful. It is part of the UCLA Stata Portal.

(iii) There are three packages available on Frank that are focused on econometrics, that is, the application of regression-type techniques to economics: RATS, TSP, and LIMDEP. Depending on instructor preference, you are likely to work at least with one of these packages. They tend to be relatively similar in use but have different strengths. RATS is the preferred package for vector autoregressions (Vars) and cointegration, LIMDEP for cross-section and panel data models. All three tend to be very responsive to new developments in econometrics and try to link their packages to the most popular econometrics textbooks. New estimators and techniques tend to show up on their respective web pages so you can use them without much own programming. Take a look at the RATS example page or the one for TSP. RATS 7 offers now also a graphical interface. If you have XMing up and running, type ratsx into the Putty program and it will start in GUI mode.

(iv) As mentioned above, there are numerous very useful statistical packages available free of charge. For a general stastistical package, consider R. This is a free-of-charge version of the commercial package S-Plus. R is a favorite with statisticians all over the world. Hence, new estimators are likely to be available relatively fast in R. The program runs well on a PC and produces nice graphs, once you get used to its somewhat idiosyncratic syntax. If you would like to have an up-to-date regression package, consider EasyReg. By far the most user-friendly econometrics program that you can download for free is called GRETL. It is "point and click" but also allows you to run commands in batch mode, with commands similar to those of TSP. SVAR is a specialized free-of-charge package focused on multivariate time series data. It is a good substitute for RATS for VARs and cointegration analysis. XPLORE is a package similar to Matlab with lots of applications in financial economics. It has many nice features, but requires some getting used to. It used to be quite costly, but is now available for free.

(v) If you are interested in a package to estimate and simulate larger macroeconometric models, consider the Fair-Parke program. It is free of charge, powerful, and quite similar to TSP. While you are looking at the Fair-Parke program, you might as well take a look at the macromodeling page of Ray Fair. Here you can download a whole macroeconometric model of the U.S. and more.

 

Mapping and Visualization

If you are doing some spatial analysis later in your graduate program, consider the following alternatives to the commercial package Arcview: GeoDa and Quantum GIS. Both can do most of what Arcview can do and then some, but they are free of charge.

At some point in time you will realize that it is very good practice to look at your data visually before you start computing. More often than you think, this can give you valuable insights in setting up your problem or in selecting useful strategies to analyze your data. GGOBI is a nice graphical package that allows you to visualize and explore high-dimensional data. It connects nicely with the statistical package R and is free of charge. Mondrian is another data-visualization system, with a statistical background. Its particular strength lie in Categorical Data, Geographical Data, and LARGE Data sets.

back to Table of Contents

 

How do I run programs that are located on Frank?

Accessing programs on Frank via Putty

Dr. Fowler has written some useful instructions and examples of how to run programs such as SAS, RATS, and MAPLE over Telnet in batch processing mode. Since TELNET is not available any longer on Frank, use the program PUTTY. Otherwise, the instructions have not changed.

The first step in using PUTTY is to configure the program PUTTY after you have installed it. I will describe the installation so you can also easily combine PUTTY with the X-Windows program XMing later. You will get the following interface


In the space entitled Host Name, type frank.mtsu.edu. In the line below, click on SSH. In the left frame of the PUTTY configuration screen, you will need to click on SSH-Tunnels. Depending on your version of PUTTY, you will get something similar to the following

Click in the space for Enable X11 forwarding. Next, click again in the left frame on Session to get back to the earlier screen.

Type frank.mtsu.edu into the space below Saved Sessions. Then click the Save button. Now you have installed PUTTY to run your Frank sessions either in batch mode or in X-Windows mode via the program XMing, which is discussed in the next section.

For now, consider batch processing. It means that one submits a whole list of program code at once in text (ascrii) mode to the program that one wants to use on Frank. In interactive use, one would submit one command at a time and wait each time for the program to respond. Example: once you are logged on to Frank, you are using the UNIX operating system interactively. Please take a look at Dr. Fowler's write-up. This file assumes you have Adobe Acrobat installed on your computer. Concentrate on the instructions that relate to invoking the programs, looking at the output, and editing input files, and understanding some of the commands of the Unix operating system that is on Frank. Do not try, at this point, to understand the technical economics and econometrics that is being used. You will get that in the respective courses.

Batch mode is useful because you cannot save your work when you are typing commands interactively into PUTTY and you cannot easily correct what you have done in an earlier line. Do not assume that you can type in your equations without error the first time or that your program will run the first time. You will quickly learn that you are making a large number of mistakes. These cover everything from misplaced commas, missing parentheses, to incomplete or wrong commands. Making programming mistakes is normal. Errors are easy to correct when you are operating in BATCH mode. All you need to do is edit the input file and resubmit it.

One more word on working in batch mode. Batch mode means that you submit an ASCII (non-binary human readable) file to a program such as Maple. The program works on the commands and then puts the output into some output file(s). You do not see anything the program does because it is working in the background. You can only see what it puts into the output file. This output file contains error messages and, if you are lucky, some results.

Here is a typical command you can give at the Frank prompt (end the command by depressing the ENTER key):

maple myinput > myoutput

This will start Maple in the background - there is no screen output; the program will open the file you named myinput that contains your Maple commands; Maple's output will be written into the file myoutput. All this may take a second or two depending on the commands you want executed and the number of concurrent users on Frank. Once you get the Frank prompt back on the screen, you can take a look at the output file myoutput.

Now that you know how to run Maple - or other programs - in batch mode, you may still wonder how to get your commands into the input file myinput or how to read the output file myoutput. There are in principle two ways to accomplish these tasks. First, you can use the program FTP to move the file myinput from your PC to Frank and use FTP to move the output file myoutput back to your PC. On your PC you can create/read input/output files with a text editor such as Crimson-Editor, which is fast, easy to use, free of charge, and avoids invisible code problems, which are typical of Microsoft Word. Instead of using FTP, you can also edit your file in Crimson-Editor and then use the FTP option in that program to move your file to Frank.

If you do not want to constantly move input and output files between Frank and your PC (either using the external program FTP or the FTP option in Crimson-Editor), you can choose to learn how to use Pico or some other text editor on Frank. Pico is clumsy compared to a PC program, such as Crimson Editor, because it is line-oriented, which means you cannot move around in a file as if you were in a Windows editing environment. Pico's commands are visible at the bottom of the Pico page.

Important note on generating graphs in Batch mode: You can typically produce nice graphs even if you run programs such as Maple, TSP, or RATS in batch mode. However, you will need to consult the program instructions on what addiitonal commands are needed. In Maple, for example, you will need to do this: before you give a plot or display command to get a graph output, you will need to include the following command in your Maple input file:

interface(plotdevice=pcx, plotoutput=`graphr1.pcx`,plotoptions=`width=800,height=600`);

You can change the name of the graph from graphr1 to something you want. But do not change the extension pcx if you want to plot in pcx format. As an alternative to printing to pcx format, you can use the postscript format. Replace pcx with ps in both plotdevice and plotoutput. You can also change the width and height and a few other settings.

 

Accessing programs on Frank via PUTTY and XMing

Let us assume that you have the program XMing set up on your PC (See the next section on how to do that). First, click on the Xming icon on the desktop or on the equivalent START>ALL PROGRAMS>XMING>XMING sequence. Use the Xming icon not the XLaunch icon! Once Xming is started, its icon will appear in the system tray in the lower right-hand corner of the Windows desktop.

Second, start the program PUTTY by clicking on frank.mtsu.edu in the Saved Sessions area; then click Load, followed by Open.

You will get a Frank prompt that let's you log in

Log in to get a Frank prompt. Now you can call up any graphical program version that runs on Frank. Notice below what happens when I give the command xstata in PUTTY. It somehow miraculously brings up the graphical version of STATA on your Windows desktop. This is accomplished by Xming, which is running the background.

The STATA you are seeing is running on Frank. As a consequence, you can access all files on Frank, but of course none of your Windows PC files. However, you can copy and paste from your XSTATA screen into a program on your Windows PC, such as Word. For example, by right-clicking your mouse when it is in the REVIEW area of STATA, you can copy all previously given commands to the clipboard and then paste the clipboard into a PC Windows program of your choice.

You communicate with the program just as you would if you had a Windows program in front of you. To exit STATA, simply click File and Exit. Once you exit STATA, you will get a Frank prompt back on your PUTTY screen.

Now you can launch another X-Windows program of your choice. For example, to launch the graphical PC-Windows like version of SAS, simply type sas. To launch the graphical version of Matlab, type matlab. You can launch Maple by the command xmaple -cw. This brings up the classical version of Maple 9.5. Leaving out -cw brings up the new graphical version of Maple 9.5. The latter version is even slower than the former one. Giving the command xmaple10 brings up the version 10. However, I cannot recommend using XMaple from off-campus. This is so slow as to be unusuable. If you want to run Maple on Frank, put your commands in a batch file and run the batch file by running maple input > output in PUTTY, where input is your input file and where output is the file that will contain your output. You can name your input and output file as you like.

A note on printing:

Do not try to print what you see in Maple or in other X-Windows software on your screen when you are running Xming. You need to save your work to a file on Frank (use FILE>SAVE AS or FILE>EXPORT), then FTP the file to your PC. You can also click on graphs in Maple and then choose to save them (export them) in one of several available picture formats to a file on Frank. Again, use FTP to move these files to your PC.

 

back to Table of Contents

How do I set up the X-Windows program Xming on my PC?

First, download the software from the following site. Download both the Xming program and the Xming-fonts.

 

The download generates the two files below.

Double-click the first one. Follow the defaults during the installation process except as noted.

 

 

Create an icon on the desktop for Xming and XLaunch.

Unmark the Launch button because the fonts need to be installed first!!

 

Now, the Fonts need to be set up. Double-click the installation file.

 

 

YES, install in the same directory as the program!

 

 

Install mark the 100dpi fonts and the DejaVu TTFs. This is the end of the installation. Xming is now ready to run.

back to Table of Contents

 

Moving files to and from Frank?

Moving binary files with FTP

The first thing to realize is that some files are binary and can only be read by the program they are intended for. For example, the files with extensions mws or mw for Maple are such files. These files need to be transferred to Frank via FTP.

Assuming that the file you want to use on Frank is located on your PC, you start the FTP (File Transfer Protocol) program that you have installed earlier to move the file to your Frank account. Since this may be new to you, I am providing below an example screen shot of the FTP program at program start-up.

Of initial interest is the window in the middle of the screen with name Session Properties. When you connect to MTSU the first time, you will need to add a profile. Click on New and then enter what you see above for Profile Name, Host Name, and Host Type. Of course, you can change the Profile Name to anything you want. You will also need to type in your Frank User ID and Password. Click on Save Pwd to save your password for your subsequent logons. Once you are done, click OK. You will get another screen similar to this one if your login to Frank is successful.

The left side of the program screen provides a view of the file structure of the D: drive of the local PC, the right side represents the directory structure of my Frank account. A few hints to get going from here. Let's say you have a file somewhere on the C: drive that needs to be moved to directory 610 on Frank. I would click on [-c-] on the left side of the screen and then simply continue clicking on directories and subdirectories until I find the file to transfer. I highlight the file by clicking on it once. Next, I double-click on 610 on the right side of the screen to indicate where the file is supposed to be moved on Frank. The only other thing that needs to be done is to click on the right arrow in the middle between the two screen sections. That tells the program to move the file from my PC to Frank. That is it. Notice that you can make a new directory either on your PC or on Frank by using the MkDir key next to the respective screen. You can move around the directory structure of your PC or Frank by simply double-clicking on the directories or drive names. To exit the program, click on Close at the bottom of the screen and then on Exit.

To move files from Frank to your PC, you go through the same steps as described above, except that you click the tranfer arrow between the two screens that points toward your PC. Moving files from Frank to your PC becomes necessary when you want output files, including files with graphs, transferred to your PC to incorporate some of the results in some write-up.

If you use the same directories on your PC and Frank many times in a row, click on Options in FTP and then on Save Current Folders as Connection Folders.

back to Table of Contents

 

ASCII files can be edited and moved with Crimson Editor

If you want to run files in batch mode along the lines discussed earlier, your input files need to be in strict text (ascii) format. Crimson Editor is a very good alternative to the standard Microsoft program Notepad to create or edit such files. It allows you to edit many files simultaneously. It finds recent files you edited, it has nice search and replace functions, etc. Crimson will also allow you to move ascii files to Frank or retrieve ascii files from Frank without ever leaving the program. You would not need to use the FTP program.

Assume you have input some program commands in ascii and want to move this to a directory on Frank.

The first time you are trying to use FTP from within Click on FILE>FTP>FTP Settings.

Input your FTP server, frank.mtsu.edu, your user name and password and the subdirectory where you want to store files. Then press OK.

Now you are ready to use the FTP server inside of Crimson to move your file to Frank. Click on FILE>FTP>Save As Remote.

Note that a Directory will show in which the file will be saved. If you do not like this directory, click on it and change it to what you want. Then click Connect, followed by Save. Alternatively, you can use the icons next to Directory to move up from the directory that is displayed or to create a new sub-directory inside the directory that is displayed and then click Save. Hitting any of these symbols is equivalent to hitting Connect.

If you want to edit a file on Frank with Crimson Editor, simply use FILE>FTP>Open Remote. Then hit Connect, click on a file and click Open. The file will transfer to your PC and show up in Crimson Editor.

Notice at the top that two files are open. The one where the arrow is pointing to was retrieved from Frank, the other was moved to Frank.

back to Table of Contents

 

Using Microsoft Internet Explorer to move files to and from Frank

You can make Microsoft Internet Explorer behave as an extension of Microsoft Windows Explorer. That way you can move files between your PC and Frank as if you are moving files from one PC directory to another in Windows Explorer.

The following steps are needed:

You will get the following screen:

Click now on FILE and select LOGIN AS. You will get a login screen. Use your Frank login username and password. When you click OK, Windows Explorer is connected to your Frank account and your root directory in Frank will appear,

Now you can use the facilities of Windows Explorer to move files, rename them, delete them, open them, etc, just as if your Frank account were another drive on your PC. Use FILE > CLOSE to disconnect.

back to Table of Contents

 

Learning Maple

Basics

An easy way to become familiar with Maple is to open up the X-Windows version in classical worksheet format (xmaple -cw) and then to click on the Help button in the top right corner of the Maple worksheet, then select Introduction from within the Help menu. As you scroll down the screen a bit, you will see this

In the section New to Maple? section you may want to try one or more of the three options available. For example, clicking on How to Perform Basic Tasks will bring up a Maple worksheet that will, among other things, provide key commands, as can be seen below. Clicking on the plus sign to the left of Examples will bring up a selection of useful applications of the commands.

To close a Help window simply click on File and Close. Do not select Exit from the File menu as this will shut down the Maple program. The Help menu provides many more entry points for beginners. For example, by clicking from within the Help menu on Getting Started... brings up a submenu from which you can select, and so forth.

Another way to learn Maple is to draw on Internet sources that are unrelated to MapleSoft, the company that is producing Maple. NOTE that some of the web sites are labeled as premium content and require registration. Registration does not cost money. If you like to watch a taped seminar on Maple, take a look at the demo page that MapleSoft has created. Also stop by the Maple website called Maple Application Center. It provides a wealth of information that will get you going not only with Maple but also in all sorts of areas of math. Of definite interest is also the Maple Student Center. There are some useful learning tutorials. I recommend the Maple Essentials and the files that guide you through Precalculus, Algebra I&II, and some parts of Geometry. If you have time, please also study Linear Algebra, and as much of the four Calculus modules as you can digest. Later during the semester, you also want to study the relevant parts of Vector Calculus, Differential Equations, and Statistics.

I highly recommend that you take a closer look at generating graphs with Maple. Some nice examples with downloadable mws files are available for two-dimensional graphs in the context of calculus and differential equations. You will be able to make use of what you can learn here throughout the course.

In several places you will find references to packages. A package can be thought of as a set of Maple commands or subroutines that each make working with Maple easier. Basically, they allow the user to give one high-level command (a command from the package) rather than trying to program Maple to do the same thing by relying only on low-level and intrinsic Maple commands. In short, commands from packages can be real time savers. Making Maple to accept commands from packages, however, is a bit tricky if you have never done that. In what follows, some simple guidelines are provided.

back to Table of Contents

 

Installing packages

A package is easy to install in Maple if it is part of the Maple installation. That applies, for example, to the Maple Finance Package. In this case, one can make use of the commands in the finance package by simply call up the package from within Maple by first giving the command

with(finance);

After that, the commands implemented in that package can be employed. You will use this method of calling up packages quite frequently. Other packages that you will use include: linalg, plots, DEtools.

Somewhat less frequently, you will use packages that you download from the Internet. An example would be the Statistics Supplement that is referenced in the Maple Application Center. To get this to work, you will need download this package and unzip the files into a new directory on your PC. For the purpose of illustation, I assume that this directory is called D:\work\maple\statistics. Inside this new directory will be a Maple mws file with examples on how to use the statistics package and a subdirectory called stat that contains the crucial files for the package. What you do next, depends on whether you are working with Maple on Frank or whether you have broken down, bought, and installed Maple on your PC to get better response time and avoid the other potential hassles of online work. If you have Maple on your PC, you can simply double-click on the mws file with the examples and Maple will be started and this file will be loaded. You will see a page similar to this appear on your screen:

 

If you execute the file line by line (by just hitting return), you will get an error message right after the second line because Maple does not recognize stat as a package and, hence, does not know what to do with the package commands. This problem arises because the information in the file does not apply to your specific installation. The directory stat is not located in C:/mylib on your PC but in D:\work\maple\statistics as I have assumed above. Hence, we need to change the first line to

libname:=`D:/work/maple/statistics/stat`,libname:

with(stat):

Notice what has been done. First, the correct directory has been inserted. Second, the inverted commas " in the first line of Maple input of the statistics example above have been replaced with the symbol `, which can be found immediately left of the key for the number one on top of your PC keyboard. Third, directories in PC Windows are identified with backslashes (\). But I converted the backslashes to slashes (/) in the libname. All three points are crucial if you want your program to run.

Now let us go over how to implement the package on Frank on the assumption that you are doing your Maple work on that machine. The first step would consist of moving the stat directory and the mws example file to Frank. You would use the FTP program on your PC for that. Assume for the purpose of illustration the following. The files in the PC directory D:\work\maple\statistics\stat have been moved to the Frank directory /users/faculty1/jzietz/610/stat and the examples.mws file is located in /users/faculty1/jzietz/610. Now you can start the X-Windows version of Maple on Frank and open the file examples.mws. Next, you need to change the libname line in that file to

libname:=`/users/faculty1/jzietz/610/stat`,libname:

with(stat):

Save the file without exiting. Now you can execute the commands of the statistics package.

Packages are not always as elaborate as the statistics package above. Sometimes, a package consists only of one file (typically, with extension .m). In that case, we simply read the file into Maple at the beginning of a session. For example, let us say we have a package that is called stochastic5.m in the Frank directory /users/faculty1/jzietz/610. To begin using it, we need to have at the beginning of our mws Maple file two lines like this

read `/users/faculty1/jzietz/610/stochastic5.m`:

with(stochastic):

back to Table of Contents

 

Running the content of a Maple mws/mw file in batch mode

You cannot run binary mws or mw files in batch mode directly from PUTTY. You will need to do the following with an mws or mw file:

1. open it from within the graphical version of Maple

2. Click Edit, then Remove Output

3. Click File, then Export As, select Maple Text as the Filter, give it a name, save the file, and exit Maple

4. Use a text (ascii) editing program to eliminate all occurrences of > from the file and save it again.

Now your file is ready to be run by Maple in batch mode. Simply give the following Unix command at the Frank prompt:

maple input.txt > output.txt &

This will call up the terminal version of Maple; it will read the file called input.txt, and it will output all responses to the file called output.txt. No echo will appear on the screen. The symbol & will ensure that you get a frank prompt back immediately even if your program is still running. You can do something else on Frank in the meantime. This is useful if your program will run for a few minutes or hours. You can call your input and output files anyway you like within the constraints set by the Unix language.

If you would rather see the results immediately on the screen rather than having to look with a text editing program into the output file, simply shorten the command to

maple input.txt

back to Table of Contents


Author: Joachim Zietz, jzietz@mtsu.edu
Original file location: http://www.mtsu.edu/~jzietz/module1/page-1.html