MATLAB. Miran H. S. Mohammed. Lecture 1

Similar documents
2.0 MATLAB Fundamentals

Introduction to MATLAB

ENGR 253 LAB #1 - MATLAB Introduction

System Design S.CS301

MATLAB is a multi-paradigm numerical computing environment fourth-generation programming language. A proprietary programming language developed by

MATLAB = MATrix LABoratory. Interactive system. Basic data element is an array that does not require dimensioning.

Lab of COMP 406. MATLAB: Quick Start. Lab tutor : Gene Yu Zhao Mailbox: or Lab 1: 11th Sep, 2013

The MATLAB system The MATLAB system consists of five main parts:

Eng Marine Production Management. Introduction to Matlab

Introduction to Matlab

MATLAB The first steps. Edited by Péter Vass

Chapter 1 Introduction to MATLAB

An Introduction to MATLAB See Chapter 1 of Gilat

MATLAB Tutorial EE351M DSP. Created: Thursday Jan 25, 2007 Rayyan Jaber. Modified by: Kitaek Bae. Outline

Computer Programming in MATLAB

An Introduction to MATLAB. Lab tutor : Dennis Yang LIU Lab 1: Sept. 11, 2014

Matlab = Matrix Laboratory. It is designed to be great at handling matrices.

Outline. CSE 1570 Interacting with MATLAB. Outline. Starting MATLAB. MATLAB Windows. MATLAB Desktop Window. Instructor: Aijun An.

Introduction to MATLAB

A/D Converter. Sampling. Figure 1.1: Block Diagram of a DSP System

Outline. CSE 1570 Interacting with MATLAB. Starting MATLAB. Outline. MATLAB Windows. MATLAB Desktop Window. Instructor: Aijun An.

Why use MATLAB? Mathematcal computations. Used a lot for problem solving. Statistical Analysis (e.g., mean, min) Visualisation (1D-3D)

Starting Matlab. MATLAB Laboratory 09/09/10 Lecture. Command Window. Drives/Directories. Go to.

EE 216 Experiment 1. MATLAB Structure and Use

INTRODUCTION TO MATLAB, SIMULINK, AND THE COMMUNICATION TOOLBOX

Outline. CSE 1570 Interacting with MATLAB. Starting MATLAB. Outline (Cont d) MATLAB Windows. MATLAB Desktop Window. Instructor: Aijun An

HERIOT-WATT UNIVERSITY DEPARTMENT OF COMPUTING AND ELECTRICAL ENGINEERING. B35SD2 Matlab tutorial 1 MATLAB BASICS

Dr Richard Greenaway

Introduction to MATLAB

Computational Photonics, Summer Term 2014, Abbe School of Photonics, FSU Jena, Prof. Thomas Pertsch

Introduction to MATLAB

Lab. Manual. Practical Special Topics (Matlab Programming) (EngE416) Prepared By Dr. Emad Saeid

Matlab Programming Introduction 1 2

General Information. There are certain MATLAB features you should be aware of before you begin working with MATLAB.

Introduction to MATLAB

Introduction to MATLAB

Matlab Introduction. Scalar Variables and Arithmetic Operators

Introduction to Matlab. Summer School CEA-EDF-INRIA 2011 of Numerical Analysis

MATLAB Introduction To Engineering for ECE Topics Covered: 1. Creating Script Files (.m files) 2. Using the Real Time Debugger

UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER

Using Eclipse for Java. Using Eclipse for Java 1 / 1

Getting To Know Matlab

CE890 / ENE801 Lecture 1 Introduction to MATLAB

University of Alberta

Lecture 1: What is MATLAB?

SIGNALS AND LINEAR SYSTEMS LABORATORY EELE

The Very Basics of the R Interpreter

Introduction to MATLAB

AMS 27L LAB #1 Winter 2009

WHAT IS MATLAB?... 1 STARTING MATLAB & USING THE COMMAND LINE... 1 BASIC ARITHMETIC OPERATIONS... 5 ORDER OF OPERATIONS... 7

MAT 343 Laboratory 1 Matrix and Vector Computations in MATLAB

Scientific Computing Lecture Series Introduction to MATLAB Programming

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS

MATLAB Programming for Numerical Computation Dr. Niket Kaisare Department Of Chemical Engineering Indian Institute of Technology, Madras

Computational Modelling 102 (Scientific Programming) Tutorials

Introduction to Engineering gii

GLY Geostatistics Fall Lecture 2 Introduction to the Basics of MATLAB. Command Window & Environment

Introduction to MATLAB

Introduction to MATLAB

Experiment 6 SIMULINK

ECE Lesson Plan - Class 1 Fall, 2001

Matlab Lecture 1 - Introduction to MATLAB. Five Parts of Matlab. Entering Matrices (2) - Method 1:Direct entry. Entering Matrices (1) - Magic Square

MATLAB BASICS. M Files. Objectives

MATLAB: The Basics. Dmitry Adamskiy 9 November 2011

Introduction to MATLAB

MATLAB Lesson I. Chiara Lelli. October 2, Politecnico di Milano

Session 3 Introduction to SIMULINK

A = [1, 6; 78, 9] Note: everything is case-sensitive, so a and A are different. One enters the above matrix as

A General Introduction to Matlab

MATLAB COURSE FALL 2004 SESSION 1 GETTING STARTED. Christian Daude 1

Short Version of Matlab Manual

! The MATLAB language

American International University- Bangladesh Faculty of Engineering (EEE) Control Systems Laboratory

DSP First. Laboratory Exercise #1. Introduction to MATLAB

the Enter or Return key. To perform a simple computations type a command and next press the

Edward Neuman Department of Mathematics Southern Illinois University at Carbondale

Matlab notes Matlab is a matrix-based, high-performance language for technical computing It integrates computation, visualisation and programming usin

Introduction to MatLab. Introduction to MatLab K. Craig 1

Chapter 1 Introduction to MATLAB

3 An Introductory Demonstration Execute the following command to view a quick introduction to Matlab. >> intro (Use your mouse to position windows on

MAT 343 Laboratory 1 Matrix and Vector Computations in MATLAB

CM0340 Tutorial 2: More MATLAB

Lab 1 Intro to MATLAB and FreeMat

Welcome to EGR 106 Foundations of Engineering II

Web Intelligence Rich Client Getting Started Business Objects 4.1

Experiment 8 SIMULINK

General Guidelines: SAS Analyst

Matlab Primer. Lecture 02a Optical Sciences 330 Physical Optics II William J. Dallas January 12, 2005

MATLAB - Lecture # 4

Part I. Introduction to Linux

SECTION 1: INTRODUCTION. ENGR 112 Introduction to Engineering Computing

Table of Contents. Introduction.*.. 7. Part /: Getting Started With MATLAB 5. Chapter 1: Introducing MATLAB and Its Many Uses 7

Introduction to MATLAB

Tutorial 1: Unix Basics

HOW TO USE CODE::BLOCKS IDE FOR COMPUTER PROGRAMMING LABORATORY SESSIONS

MATLAB. Devon Cormack and James Staley

Introduction to Matlab

PRACTICAL file. Department: Computer Science and Engineering. Simulation and Modeling Lab. Subject Code: BTCS 607. Semester:

Outline. User-based knn Algorithm Basics of Matlab Control Structures Scripts and Functions Help

MATLAB Project: Getting Started with MATLAB

Transcription:

MATLAB Miran H. S. Mohammed 1 Lecture 1

OUTLINES Introduction Why using MATLAB Installing MATLAB Activate your installation Getting started Some useful command Using MATLAB as a calculator 2

INTRODUCTION MATLAB is an extremely powerful software application and development tool that is widely used in most universities in technical fields. MATLAB is an interactive system whose basic data element is an array that does not require dimensioning MATLAB is available for Windows, Macintosh and UNIX systems. It is used by more than one million people in industry and academia. MATLAB features a family of add-on application-specific solutions called toolboxes. Very important to most users of MATLAB, toolboxes allow you to learn and apply specialized technology. Toolboxes are comprehensive collections of MATLAB functions (M-files) that extend the MATLAB environment to solve particular classes of problems. You can add on toolboxes for signal processing, control systems, neural networks, fuzzy logic, wavelets, simulation, and many other areas. 3

Desktop Tools and Development Environment: This is the set of tools and facilities that help you use and become more productive with MATLAB functions and files. Many of these tools are graphical user interfaces. It includes the MATLAB desktop and Command Window, a command history, an editor and debugger, a code analyzer and other reports, and browsers for viewing help, the workspace, files, and the search path. Mathematical Function Library: This is a vast collection of computational algorithms ranging from elementary functions, like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like matrix inverse, matrix Eigen values, Bessel functions, and fast Fourier transforms. 4

The Language: This is a high-level matrix/array language with control flow statements, functions, data structures, input/output, and object-oriented programming features. It allows both "programming in the small" to rapidly create quick and dirty throw-away programs, and "programming in the large" to create large and complex application programs. Graphics : MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well as annotating and printing these graphs. It includes highlevel functions for two-dimensional and threedimensional data visualization, image processing, animation, and presentation graphics. It also includes low-level functions that allow you to fully customize the appearance of graphics as well as to build complete graphical user interfaces on your MATLAB applications. 5

WHY USING MATLAB? Advantages: It allows quick and easy coding in a very high-level language. Rich data types: Complex number, Three dimensional matrix, structure, cell array, etc Lots of nice functions and toolboxes: fminsearch, fsolve, normcdf, norminv, etc; garch, optimization, symbolic, Lots of users: economists, mathematicians, engineers, High-quality graphics and visualization facilities are available. MATLAB M-files are completely portable across a wide range of platforms. 6

So why is it called MATLAB? MATLAB is short for MATrix LABoratory. MATLAB was originally designed for manipulating matrices. In fact, when you use a simple variable such as x in MATLAB, it is actually stored as a ( x ) matrix. In order to understand how MATLAB works, we will need to be familiar with matrix calculations. We will cover more on this topic later. 7

INSTALLING MATLAB Before you install make sure! Have your File Installation Key and License File handy. You need both these items to perform an offnetwork installation and activation. Then, click on the installer icon from the drive(cd, DVD, ) 8

Choose to Install Without Using the Internet 9

Review the License Agreement 10

Specify the File Installation Key 11

Choose the Installation Type 12

Specify the Installation Folder 13

Wait for finishing the installation 14

Program configuration note 15

Complete the Installation 16

ACTIVATE YOUR INSTALLATION Choose Activate manually without the Internet 17

Specify the Path to the License File 18

Complete the Activation 19

GETTING STARTED you can enter MATLAB by double-clicking on the MATLAB shortcut icon on your Windows desktop. When you start MATLAB, a special window called the MATLAB desktop appears. The desktop is a window that contains other windows. The major tools within or accessible from the desktop are: The Command Window The Command History The Workspace The Current Directory The Help Browser 20

Menu bar Tool bar Current directory Current folder Work space Command window History command 21

MATLAB Desktop: Launch Pad: displays all the tools and applications associated with MATLAB; Command window: the space for writing your codes. Workspace: consists of the variables you create during a MATLAB session; Command History: double click them to evaluate them; Current Directory browser: shows you where you are. 22

SOME USEFUL COMMAND Version: to show the version of MATLAB cd : change directory to the root cd.. : change directory one level cd D:\ : change directory to drive D: mkdir D:\name : make directory in D: clc : clear screen Clear: clear all exit or quit: exit from the program help about : getting help Many other 23

USING MATLAB AS A CALCULATOR You are now faced with the MATLAB desktop on your computer, which contains the prompt (>>) in the Command Window. As an example of a simple interactive calculation, just type the expression you want to evaluate. For example, let's suppose you want to calculate the expression, 1 + 2 * 3. You type it at the prompt command (>>) as follows, >> 1+2*3 ans = 7 24

You will have noticed that if you do not specify an output variable, MATLAB uses a default variable ans, short for answer, to store the results of the current calculation. Note that the variable ans is created (or overwritten, if it is already existed). To avoid this, you may assign a value to a variable or output argument name. For example, >> x = 1+2*3 x = 7 will result in x being given the value 1 + 2 * 3 = 7. This variable name can always be used to refer to the results of the previous computations. Therefore, computing 4x will result in >> 4*x ans = 28.0000 25

26