Cargando…

MATLAB® by example : programming basics /

This book is designed to guide the reader through each step of writing Matlab programs. The book begins assuming the reader has no previous programming experience, and it uses multiple examples and clear language to introduce concepts and practical tools. The straight-forward and detailed instructio...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autores principales: Gdeisat, Munther (Autor), Lilley, Francis (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: London ; Waltham, Mass. : Elsevier, 2013.
Colección:Elsevier insights.
Temas:
Acceso en línea:Texto completo
Texto completo
Tabla de Contenidos:
  • Front Cover
  • Matlab by Example: Programming Basics
  • Copyright Page
  • Contents
  • Preface
  • Acknowledgments
  • Why This Book Is Different
  • How This Book Is Organized
  • 1 Matlab Integrated Development Environment
  • Lesson 1.1 Basics of the Matlab Integrated Development Environment
  • 1.1.1 Matlab Integrated Development Environment
  • 1.1.2 Creating Scalar Variables
  • 1.1.3 Creating Vector Variables
  • 1.1.4 Creating Array Variables
  • Lesson 1.2 Matlab Script Files
  • 1.2.1 Creating a Script File
  • 1.2.2 Naming a Script File
  • 1.2.3 Saving a Script File
  • 1.2.4 Executing a Script File
  • 1.2.5 Matlab Code Readability
  • 1.2.6 Commenting Matlab Code
  • Lesson 1.3 Matlab Editor-Cell Mode
  • 1.3.1 Enabling Cell Mode
  • 1.3.2 Separating a Program into Cells
  • 1.3.3 Evaluating Code in a Cell
  • Answers to Selected Exercises
  • Lesson 1.2
  • Exercise 1
  • Exercise 2
  • 2 Scalars in Matlab
  • Lesson 2.1 Creating and Naming Matlab Scalar Variables
  • 2.1.1 Matlab Special Variables
  • 2.1.1.1 Using Matlab Special Variables
  • 2.1.1.2 Changing the Values of Matlab Special Variables
  • 2.1.2 User-Defined Variables
  • 2.1.2.1 Naming a User-Defined Variable
  • 2.1.2.2 Matlab is Case Sensitive
  • 2.1.2.3 Clearing a User-Defined Variable
  • Lesson 2.2 Approximation of Numbers and Discrete Mathematical Operations
  • 2.2.1 Approximating Numbers
  • 2.2.1.1 round Function
  • 2.2.1.2 fix Function
  • 2.2.1.3 ceil Function
  • 2.2.1.4 floor Function
  • 2.2.2 Discrete Mathematical Operations
  • 2.2.2.1 Factorizing a Number
  • 2.2.2.2 Greatest Common Divisor
  • 2.2.2.3 Least Common Multiple
  • Lesson 2.3 Mathematical Expressions for Scalar Variables
  • 2.3.1 Creating Variables
  • 2.3.2 Precedence of Mathematical Operations
  • 2.3.3 From Mathematical Expressions to Matlab Expressions
  • 2.3.4 From Matlab Expressions to Mathematical Expressions.
  • Lesson 4.4 Arithmetical Operations on Arrays
  • 4.4.1 Array Addition and Subtraction
  • 4.4.1.1 Array Addition
  • 4.4.1.2 Array Subtraction
  • 4.4.1.3 Adding a Number to an Array
  • 4.4.1.4 Subtracting a Number from an Array
  • 4.4.2 Matrix and Element-By-Element Arithmetical Operations
  • 4.4.3 Array Multiplication
  • 4.4.3.1 Element-By-Element Multiplication for Arrays
  • 4.4.3.2 Matrix Multiplication
  • 4.4.3.2.1 Mathematical Background
  • 4.4.3.2.2 Matrix Multiplication for Arrays
  • 4.4.3.2.3 Multiplying an Array by a Number
  • 4.4.4 Array Division
  • 4.4.4.1 Element-By-Element Division for Arrays
  • 4.4.4.2 Matrix Division for Arrays
  • Lesson 4.5 Plotting Arrays
  • 4.5.1 Mathematical Background for 3D Plotting of Arrays
  • 4.5.2 3D Plot an Array with the mesh Function
  • 4.5.3 Increasing the Resolution of a 3D Plot
  • 4.5.4 3D Plot an Array with the surf Function
  • 4.5.5 3D Plot an Array Using its Row-and-Column Indices
  • 4.5.6 Background for 2D Plotting of Arrays
  • 4.5.7 2D Plot an Array with the imagesc Function
  • Answers to Selected Exercises
  • Lesson 4.3
  • Exercise 14
  • Exercise 15
  • Exercise 18
  • Exercise 20
  • 5 Matlab Functions
  • Lesson 5.1 Introduction to Functions
  • 5.1.1 What Is a Function?
  • 5.1.2 The Purpose of a Function
  • 5.1.2.1 Improves Code Readability
  • 5.1.2.2 Improves Code Reusability
  • 5.1.2.3 Modifying Code
  • 5.1.3 Calling a Matlab Function
  • Lesson 5.2 Creating Functions
  • 5.2.1 Creating a Matlab Function
  • 5.2.2 Naming a Matlab Function
  • 5.2.3 Saving a Matlab Function
  • 5.2.4 Calling a Matlab Function
  • 5.2.4.1 Calling a Matlab Function from the Command Window
  • 5.2.4.2 Calling a Matlab Function from a Script File
  • 5.2.4.3 Calling a Matlab Function from Another Function
  • 5.2.5 A Matlab Function Returning Two Values
  • Lesson 5.3 Scope of Matlab Variables in a Function.