Digital Signal Processing Using MATLAB and Wavelets

Chapter 2: MATLAB

MATLAB is a programming environment which has gained popularity due to its ease of use. The purpose of this chapter is not to teach MATLAB programming, but it is intended to provide a quick reference to MATLAB. It is easy to understand if you already know a programming language; if you do not, the following examples should help. Whether you are an experienced programmer or a beginner, the best thing to do is try the examples on your computer. MATLAB provides an interactive environment that makes this easy: you type a command, and it executes it. If there is a problem, it will let you know, and you can try again. If a command works well, you can copy and paste it into a file, creating a complex program one step at a time.

In fact, we will consider any group of commands that are stored in a file to be a program. The only distinction between a program and a function is the "function" keyword used in the first (noncomment) line in a file. This line specifies the inputs and outputs, as well as the function name. It is a good idea to give the function the same name as the file that it is stored in. The filename should also have ".m" as the extension. An example function will follow shortly.

MATLAB provides an editor, which will color text differently based on its functionality. Under this editor, comments appear in green, strings appear in red, and keywords (such...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Robot Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.