02.03.2016 Views

MATLAB by rudra pratap

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.1 Lesson 1: A Minimum <strong>MATLAB</strong> Session<br />

17<br />

2.1 Lesson 1: A Minimum <strong>MATLAB</strong> Session<br />

Goa/: To learn how to log on, invoke <strong>MATLAB</strong>, do a few trivial calculations, quit<br />

MATLAn, and log off.<br />

Time Estimates<br />

Lesson: 10 minutes<br />

Exercises: 30 minutes<br />

What you are going to learn<br />

• How to do simple arithmetic calculations. The arithmetic operators are<br />

• How to assign values to variables.<br />

• How to suppress screen output.<br />

+<br />

*<br />

I<br />

addition,<br />

subtraction,<br />

multiplication,<br />

division, and<br />

exponentiation.<br />

• How to control the appearance of floating point numbers on the screen.<br />

• How to quit <strong>MATLAB</strong>.<br />

The <strong>MATLAB</strong> commands/operators used are<br />

+, - , *, /, - ,<br />

sin, cos , log<br />

format<br />

quit<br />

In addition, if you do the exercises, you will learn more about arithmetic operations,<br />

exponentiation and logarithms, trigonometric functions, and complex numbers.<br />

Method: Log on and launch <strong>MATLAB</strong>. Once the <strong>MATLAB</strong> command window<br />

is on the screen, you are ready to carry out the first lesson. Some commands and<br />

their output are shown in Fig. 2.1. Go ahead and reproduce the results.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!