Computational Assignments/Resources for MATH 222


Computer Assignments

Due the day mentioned in the assignment description

You can use MATLAB or any other programming language to complete the assignments. NOTE: you will be required to graph results, so it is a good idea to learn how to do this either with MATLAB, or with some other graphics package.


File Formats for Assignments/Handouts

Some downloadable files on this site will be either in the Postscript or PDF formats, and can be viewed using Ghostview or Acrobat Reader, respectively. Other files will be simple ascii text files (of code examples, MATLAB scripts, etc.) and can be downloaded by holding down the SHIFT key while left-clicking on the pertinent link.


Information Regarding the Computer Assignments


Online MATLAB Tutorials, Software, and JAVA Applets for Differential Equations

Here is a collection of LINKS pointing to online documentation and interesting MATLAB programs and JAVA applets that can be useful to those who wish to learn more. I strongly suggest that MATH 222 students browse through the links and try out the software. Included are links to Matlab codes used in the textbook.


Essential MATLAB Information

Availability

MATLAB is available in the PC Labs. Also, it is available on the AFS system which replaced megahertz. AFS computers (SUN and SGI) run the UNIX operating system, and you can find easy-to-follow information here; at the same location (a few lines down) you can find information on how to connect to the AFS system from off-campus (e.g., your home). Go here if you do not have an AFS account. Be advised that running MATLAB over the net will be slow unless you have a 56.6 modem or faster connection.

Running MATLAB Remotely on AFS From a LINUX PC

Congratulations ! You have all the software you need. Start your Xwindows and type xhost + on the window you plan to use. Telnet to the AFS machine of your choice and use the instructions in the second paragraph below.

Software Required to Run MATLAB Remotely on AFS From a MS-Windows PC

MATLAB displays graphical results in a separate window on your computer screen. This window is created by Xwindows (not those out of Seattle !). As such, a special piece of software is required when you are running MATLAB on AFS while sitting in front of a PC running Microsoft Windows (9X or NT). If your PC runs LINUX you do not need this special piece of software because Xwindows is the windows system on the LINUX version of UNIX. Until the time when LINUX will have conquered the PC World, all MS-Windows PC users must have an Xwindows Terminal Emulator for Windows 9x and NT running on their PC while using MATLAB on an AFS computer. Fortunatelly, NJIT offers it for free from here (near the bottom of the page); if you have a slow modem at home, use the PC Labs to download the program onto a ZIP disk (it is about 4.5MB !), or got to the PC Store to ask whether they can sell you a copy.

Running MATLAB Remotely

Once you have an AFS account and the Xwindows emulator (unless you are running LINUX), start the emulator, login the AFS machine of your choice, and check how many users are logged on (just type w, hit return, and look at the first line that comes on the screen for the number of users). MATLAB will be slow if the system is loaded (look at the load average shown on the first line of output of the w command). If the number of users is large and the load is high (>3) just log onto another of the many AFS machines available, and find the one that runs a low load. Here is an example of using the w command:

jarrett-44 peterp>: w
11:31am up 5:51, 2 users, load average: 0.02, 0.04, 0.12
User tty login@ idle JCPU PCPU what
vitaly dtremote 10:15am 32 27 3 /bin/tcsh
vitaly pts/6 10:16am 1:14 /bin/tcsh
vitaly pts/7 10:17am 11 /bin/tcsh
peterp pts/13 10:45am 1 w
jarrett-45 peterp>:

The example above shows that the load is low.

Once you have found a machine to run MATLAB, issue the who command, and find your username among its output on the screen; the last entry (in parentheses) shows the address from which you are logged on the particular AFS machine where you will run MATLAB. Here is an example that shows I am logged on from the machine ouzo.njit.edu:

jarrett-43 peterp>: who
vitaly dtremote Sep 6 10:15 (dhcp155-38:0)
vitaly pts/6 Sep 6 10:16 (dhcp155-38:0.0)
vitaly pts/7 Sep 6 10:17 (dhcp155-38:0.0)
peterp pts/13 Sep 6 10:45 (ouzo.njit.edu)
jarrett-45 peterp>:

Then, at the command prompt issue the following: setenv DISPLAY xxx where xxx is whatever appears inside the parentheses in the example above. You are now ready to run MATLAB by simply typing matlab (in lower-case) at the command prompt.


Return to this page periodically for additional material