Chapter 1. Introduction to MATLAB ® and Its Graphics Capabilities

Chapter 1. Introduction to MATLAB ® and Its Graphics Capabilities

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
© 2001 by CRC Press LLC 1 Introduction to MATLAB ® and Its Graphics Capabilities 1.1 Getting Started MATLAB can be thought of as a library of programs that will prove very use- ful in solving many electrical engineering computational problems. MAT- LAB is an ideal tool for numerically assisting you in obtaining answers, which is a major goal of engineering analysis and design. This program is very useful in circuit analysis, device design, signal processing, filter design, control system analysis, antenna design, microwave engineering, photonics engineering, computer engineering, and all other sub-fields of electrical engi- neering. It is also a powerful graphic and visualization tool. The first step in using MATLAB is to know how to call it. It is important to remember that although the front-end and the interfacing for machines with different operating systems are sometimes different, once you are inside MAT- LAB, all programs and routines are written in the same manner. Only those few commands that are for file management and for interfacing with external devices such as printers may be different for different operating systems. After entering MATLAB, you should see the prompt >> , which means the program interpreter is waiting for you to enter instructions. (Remember to press the Return key at the end of each line that you enter.) Now type clf . This command creates a graph window (if one does not already exist) or clears an existing graph window. Because it is impossible to explain the function of every MATLAB com- mand within this text, how would you get information on a certain command syntax? The MATLAB program has extensive help documentation available with simple commands. For example, if you wanted help on a function called roots (we will use this function often), you would type help roots . Note that the help facility cross-references other functions that may have related uses. This requires that you know the function name. If you want an idea of the available help files in MATLAB, type help . This gives you a list of topics included in MATLAB. To get help on a particular topic such as the Optimization Toolbox, type help toolbox/optim . This gives you a list of
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
© 2001 by CRC Press LLC all relevant functions pertaining to that area. Now you may type help for any function listed. For example, try help fmin . 1.2 Basic Algebraic Operations and Functions The MATLAB environment can be used, on the most elementary level, as a tool to perform simple algebraic manipulations and function evaluations. Example 1.1 Exploring the calculator functions of MATLAB. The purpose of this example is to show how to manually enter data and how to use basic MATLAB alge- braic operations. Note that the statements will be executed immediately after they are typed and entered (no equal sign is required).
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern