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

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

View Full Document Right Arrow Icon
MATLAB Basics Prepared by M.G. Knight and L.C. Wrobel 10 th December 2002 Revised 24 th October 2003
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
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 Right Arrow Icon
Ask a homework question - tutors are online