Math 335A
Numerical Analysis
Fall, 2004

Introduction to Matlab and Scilab

Matlab

Start up Matlab. If this is your first time doing so, you will note that three frames appear in the window, one giving the “Current Directory”, one for a “Command History”, and the “Command Window”. In the command window you should see some identifying text followed by two greater-than symbols “>>”; this is the Matlab prompt.

You will be running one of Matlab's out-of-the-box demos. The demo will contain each of the following:

You'll be able to recognize the commands because they are preceded by the Matlab prompt “>>”. As you run the demo, you should step through one slide at a time and, as you view a slide, return to the command window and type in the same commands as those you see in the slide. This will help you get accustomed to actually using Matlab, as well as give you a better feel for how Matlab actually behaves in response to these commands.

The demo you will be running is called “intro”. To start it, enter at the command prompt

>> playshow intro
What you learn from this demo should be sufficient to allow you to carry out the exercises below, which are to be done in Matlab.

Scilab

Recall that Scilab is a similar piece of software and, while it does not have all the functionality of Matlab, is being actively maintained and may be downloaded and installed on your local computer (at least, for each of Windows, Mac OS X and Linux) free of charge. Before quitting Matlab or turning to the exercises, start up Scilab, re-run (from the Matlab command prompt) the demo you just went through, and this time try the commands at the Scilab command prompt “-->”. You will notice that some commands are identical and produce the same output. Scilab is not, however, an identical clone (Was that redundant?) of Matlab. For instance, Scilab does not recognize

At this point, you have done about as much as your professor is likely to ask of you this semester in Scilab. It is entirely up to you whether you should obtain a copy for yourself and use it for those problems/assignments for which it may be appropriate. If you do so, and if you find commands, workarounds, clever ideas, etc. which you think would be helpful to others using Scilab, please add them to the Scilab log.

Exercises

Back to Math 335A Home Page


This page maintained by: Thomas L. Scofield
Department of Mathematics and Statistics, Calvin College

Last Modified: Tuesday, 24-Aug-2004 17:05:47 EDT