ABOUT THE LABS

Click on the section you wish to go to directly; or simply scroll down the screen.



WHAT IS THE PURPOSE OF THE LABS?

The labs are intended to give you a practical experience with some of the abstract concepts you cover in lecture. With the help of the MATLAB software you will be able to do things like, for example, plot sequences and solutions to differential equations and quickly see the effects of changing the parameters in your input.


WHAT AM I SUPPOSED TO DO IN THE LAB TODAY?

To see the lab assignments, go to The Math 21D Computer Assignments and select the number of the lab corresponding to the current week of the quarter. This document will tell you exactly what you are supposed to do.


WHAT IS MATLAB?

MATLAB is very powerful interactive software for numerical computations and graphics. You can use it as a graphing calculator, but it is also used in industry to write long and complicated programs. Yes, this software is actually used in the real world, and if you plan to apply for jobs in engineering and computer science your expertise with it can really boost up your resume!

Here are some further links to websites related to MATLAB:

A Practical Introduction to Matlab

Official Introduction to MATLAB by its makers

 


WHEN, WHERE AND HOW DO I COMPLETE THE LABS AND WHEN DO I TURN THEM IN?

Completing the lab means going through the required exercises described in the Math 21D Computer Assignments and creating a Microsoft Word file with the required results cut and pasted from your Matlab notebook. You will then print out the Word file on a laser or inkjet printer (no dot matrix printouts will be accepted!!) and hand it in at the beginning of section on the Tuesday following the Thursday lab sections. Be sure to see the specific guidelines regarding the write-up.

The Thursday morning sections in B432 AP&M (A01, A02) or CLICS (northeast or northwest corners of Galbraith hall) (A03, A04) are intended for you to do your labs in. If you don't complete them then, you may come in to CLICS on your own time and complete them.

While we will not take attendance in the lab sections, you are strongly encouraged  to attend them. If you work on your own keep in mind that there will be no TA to help you and you may miss some important information that the TA may mention during the lab session.

 


CAN I WORK AT HOME?

Completing the labs at home is theoretically possible but highly unrecommended. It would entail either a) buying the MATLAB software and, in addition, downloading a bunch of extra files or b) remotely logging into U.C.S.D. and using Xwindows to access the Unix version of MATLAB. The latter option requires a fast connection and is fraught with technical issues that lie outside the range of the TAs' expertise and duties. If you choose either a) or b)  you will be on your own. 


PROCEDURES: LOGGING IN, OUT AND LAUNCHING MATLAB

While it may not appear so on the surface, IT IS CRUCIAL THAT YOU LOG IN! It may look like you are able to do what you need to do without having logged in. However, you will not be able to save your work -- you may have the illusion that you are saving it, but it will promptly get erased after you log out. Neither will you be able to print. 

LOGGING IN INSTRUCTIONS:

In order to log in to your account, go to:
START --> Log-In

At the LOG-IN: Account Type window, choose:
1. Course-specific Account

At the LOG-IN: Server List 1 window, choose:
E. iNSci14

At the LOG-IN: Enter Username window, enter ther user login name provided by ACS for you. It's the one that looks like:
ma20fXX

At the LOG-IN: Enter Password window, enter your password. Unless otherwise specified, it is your student ID number.

At the LOG-IN: Printer Option window, enter
laser64

At this point, you should get a window that says the computer is currently making connections. If you have entered everything correctly, after a moment you should get a window that looks like this:

 Status    Local    Remote

 ----------------------------------------------------

 OK        H:       \\insci14\ma20fXX
 OK        P:       \\insci14\ma20f.pub
 OK        LPT1     \\ACS_...
 OK        LPT2     \\insci14\laser64

What You Have Access To.You are now logged in. This gives you access to two additional drives:

LAUNCHING MATLAB

Actually launching MATLAB is easy enough. Just log into your account, and then go to:
START --> Programs --> MATLAB 6.1

The MATLAB screen will pop up after a moment or too.

The very next step is to type the following two commands at the MATLAB prompt.
>> addpath p:\matlab
>> addpath h:\

The first command gives you access to the public directory, which stores the extra files you will need, such as dfield5 . The second command allows MATLAB to load saved notebooks from your home directory (the only directory you're allowed to save stuff to).

LOGGING OUT

Before you leave any workstation, be sure you log out. DO THIS EVERY TIME YOU LEAVE THE MACHINE. This will ensure that no one has access to  your H: drive (and hence your homework) or the P: drive (and hence everyone else's use of MATLAB).

In order to log out of your account, go to:
START --> Log-Out
and press Enter at the prompt. This will restart the system and you will be logged out.

 


HOW DO I SAVE MY WORK? 

The only safe place on the hard drive for you to save your work is in the :\H drive. If you save it anywhere else it will be erased. You can only access the :\H drive if you have logged in.

Important information about saving MATLAB files: If you want to save your MATLAB file go to the File menu and point to Save Workspace as. The plots need to be saved separately (they have their own File menu). Be aware that MATLAB will not save every single entry you made, but will just remember the last values of the variables that you assigned. 

For example, let's say you entered 

n=5;

a=2^n;

When you save this file and open it again, you will not see the two lines that you entered. However, if you type 

a

It will return 32. 

If you want to record your entries it is a good idea to type them in a .m file. That way you'll be able to have MATLAB execute all the commands in the .m file by simply typing its name. Click here to learn how to use .m files. You can also copy and paste your commands into a separate Microsoft Word file.


PRINTING 

If you want to print at CLICS or in AP&M, it will cost you money. See below. If you want to print at home, email yourself your finished Word document or save it on a floppy. You may not want to do this right before the homework is due, since if you have any technical difficulties with your printer at home, you'll be in a bind. Unless you have purchased the MATLAB software, you will not be able to open the MATLAB file on your computer.

Prerequisites: To print using one of Galbraith Hall's laser printers, you must be logged into your account. You also need a printing account, which can be opened (with a $10 minimum balance) at the ACS desk on in APM 2113; the laser printers cost students 5 cents per page. To open a printing account, you should go to ACS and fill out a laser printing request form, pay your $10, and have the printing account linked to the math-specific account and, if applicable, your personal UCSD account as well. For further information, students can go to the ACS homepage.

We are supposed to use the printer laser64, which is located by our little corner of computers; it is the default LPT2 printer you should see when you successfully log in.

Printing:  To print, close down all non-essential applications (i.e. usually everything but the Word document). Double click on My Computer, and then double-click on Printers. Select (by single-clicking) the printer model given in as the default LPT2. Then select Print from the File Menu of the application you which to print.

Periodic problems with printing can be handled by the Zebras -- the guys in black-striped goalie shirts on the lower floor of the library.


A SUMMARY OF HELPFUL MATLAB WEBSITES



 03/25/2002