matlab basics[1]

# matlab basics[1] - MATLAB Basics Prepared by M.G Knight and...

This preview shows pages 1–4. Sign up to view the full content.

MATLAB Basics Prepared by M.G. Knight and L.C. Wrobel 10 th December 2002 Revised 24 th October 2003

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

View Full Document
INTRODUCTION TO MATLAB 6.1 ME1302 Analytical Skills and Quantitative Methods - 1 - 1. GETTING STARTED Matlab is installed in all PCs in TC406. To access the program, click: Start SED Software Matlab and then click on the Matlab 6.1 icon. You should now see the following prompt and are ready to begin using Matlab: >> (whenever you see >> type the printed command followed by RETURN) To exit Matlab type >> exit 2. GENERAL PURPOSE COMMANDS A list of some of the basic commands within Matlab is given below. General information help - On-line help, display text at command line. helpwin - On-line help, displayed in the help browser. demo - Run demonstrations. Basic commands. who - List current variables. whos - List current variables, long form. clear - Clear variables and functions from memory. quit - Quit MATLAB session. and - Cycles through previous commands entered ; - Suppresses output to screen (if added to the end of a command) 3. ARITHMETIC OPERATIONS AND VARIABLES Matlab is capable of performing simple arithmetic calculations (+ for addition, - for subtraction, * for multiplication, / for division). For example: >> 5*4 ans = 20 You can perform several calculations at once, try: >> 2+3, 4*5, 4-7, 2/10
INTRODUCTION TO MATLAB 6.1 ME1302 Analytical Skills and Quantitative Methods - 2 - In addition, it is often useful to store values to variables. You can use any name for a variable provided it is not also a Matlab function such as cos, sin, exp and so on. Try the following: >> x = 1 To recall the value of a variable type the variable name followed by RETURN. It is possible to use variables in expressions: >> y = x + 3 Be aware that Matlab is case sensitive i.e. x is not the same as

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/02/2009 for the course AERO 0398930 taught by Professor Dryeng during the Spring '09 term at University of Bristol.

### Page1 / 8

matlab basics[1] - MATLAB Basics Prepared by M.G Knight and...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online