Docsity

Introduction to MATLAB: Advantages, Disadvantages, and Environment, Slides of Matlab skills

Partial preview of the text

Download Introduction to MATLAB: Advantages, Disadvantages, and Environment and more Slides Matlab skills in PDF only on Docsity!

Chapter One

Introduction to MATLAB

  • The Advantages of MATLAB
  • Disadvantages of MATLAB
  • The MATALB Environment
  • Using MATLAB as a Scratch Pad
  • Exercises

Introduction

  • MATLAB (MATrix LABoratory) is a special-

purpose computer program optimized to perform

engineering and scientific calculations.

  • To implement the MATLAB programming language
  • To provides a very extensive library of predefined functions
  • To make technical programming tasks easier and more efficient.
  • How to write, debug, and optimize good

MATLAB programs.

Disadvantages of MATLAB

  • It is an interpreted language and can execute more

slowly than compiled languages.

  • By properly structuring the program
  • By using the MATLAB compiler
  • Cost
  • A full copy of MATLAB is five to ten times more expensive than conventional compiler
  • Reduced time for engineers or scientists to create a working program
  • An inexpensive Student Edition of MATLAB

The MATALB Environment

  • The MATLAB Desktop
  • The Command Window
  • The Command History Window
  • The Start Button
  • The Edit/Debug Window
  • Figure Windows
  • Docking and Undocking Windows
  • The MATLAB Workspace
  • The Workspace Browser
  • Getting Help
  • A Few Important Commands
  • The MATLAB Search Path

User input Result of calculaton The Command Window

Figure 1.3 The Command History Window, showing two commands being deleted.

  • The Command History Window
  • The Edit Window The Debug Window (chapter 2)
  • Figure Windows
  • The MATLAB Workspace
  • A workspace is the collection of all the variables and arrays that can be used by MATLAB when a particular command, M-file, or function is executing.

Workspace Browser shows a list the variables defined in the workspace Array Editor allows the user to edit any variable or array selected in the Workspace Browser.

  • The Workspace Browser

A Few Important Commands

• demo: to run MATLAB’s built-in

demonstrations

• clc: to clear the contents of the Command

Window

• clf: to clear the contents of the current

Figure Window

• ^c: the abort command