![]() |
![]() ![]() |
The
MATLAB/SIMULINK Page
MATLAB and SIMULINK are products developed and sold by The MathWorks, Inc. of Natick, Massachusetts. MATLAB is an integrated technical computing environment and is the basic processing engine for an extensive set of toolbox products. SIMULINK is a graphical interface to MATLAB which provides an interactive environment for modeling, analyzing, and simulating a wide variety of dynamic systems.A MATLAB (r13) and a complete set of toolboxes is available through "FAS Sofware Download" and both MATLAB and SIMULINK are mount on both Windows and MacOS platforms at the Science Center (see the directory "Math & Statistics" on the shared disk "General Software, FAS_SERVER3" in the FAS computer services. If you want to work away from Harvard, a student versions is available.
MATHLAB Student Version
from The MathWork
CSCI E129 MATLAB Resources:
Before you start downloading course MATLAB software, first create (if it does not already exist) a folder or directory called CSCIE129 in the MATLAB folder.As you add files it is important that you understand a bit about the MATLAB's search protocol. To briefly quote from Using MATLAB below.
The MATLAB Search PathYou can change and browse the search path by using set path in the MATLAB file menu. You can also directly use the commands path, addpath and rmpath in the command window.MATLAB has a search path that it uses to find M-files. MATLAB’s M-files are organized in directories or folders on your file system. Many of these directories of M-files are provided along with MATLAB, while others are available separately as Toolboxes.If you enter the name foo at the MATLAB prompt, the MATLAB interpreter:
1 Looks for foo as a variable.While the actual search rules are more complicated because of the restricted scope of private functions, subfunctions, and object-oriented functions, this simplified perspective is accurate for the ordinary M-files that you usually work with.
2 Checks for foo as a built-in function.
3 Looks in the current directory for a file named foo.m.
4 Searches the directories on the search path for foo.m.
If you have more than one function with the same name, only the first one in search path order is found; other functions with the same name are considered to be shadowed and cannot be executed.
Available MATLAB course software:
- The first CSCI E-129 software package that may be downloaded contains three tutorial programs -- viz.
sigsim is used in lectures and is a, more-or-less, self-explanatory visual and auditory study of the effect of adding sinusoidal signal components.
xpsound also is used in lectures and demonstrates the temporal and spectral characteristics of complex sound.
sndwave is a more elaborate piece of software. In it, we try to link the visualization of a sound wave propagating through a medium with a representation of a signal generated by that that wave when it is picked up by a microphone.
- From past experience, I have found that the most reliable option is to let you download the following complete set of source files and then save them as ".m" files: cscie129_pkg1
- The second CSCI E-129 software package. I suggest the following steps to download three MATLAB functions for use in Simulink modeling.
- Open sg_adconv4.m with your browser and then save it as a "source file" in your working directory. Be sure that you include it in the MATLAB search path before calling it in Simulink. The header on the file explains how the function works or you can write in the Command Window "help sg_adconv4." In the Command Window, try converting a number by writing, for example, sg_adconv4(-6).
- Open sg_adconv8.m with your browser and then save it as a "source file" in your working directory. Be sure that you include it in the MATLAB search path before calling it in Simulink. The header on the file explains how the function works or you can write in the Command Window "help sg_adconv8." In the Command Window, try converting a number by writing, for example, sg_adconv8(-6).
- Open video129.m with your browser and then save it as a "source file" in your working directory. Be sure that you include it in the MATLAB search path before calling it in Simulink. The header on the file explains how the function works or you can write in the Command Window "help video129."
If you get stuck, here is more than you need in the way of information from Help Desk (HTML) in the MATLAB Help menu. In the PDF Full Documentation Set the following are particularly useful:
MATLAB Documentation Links
- Getting Started with MATLAB
Explains how to get started with the fundamentals of MATLAB.
- Using MATLAB
Provides in depth material on the MATLAB language, working environment, and mathematical topics.