4

Arrays in Matlab

Chapter Outline

Lesson 4.1 Creating Arrays

Lesson 4.2 Relational and Logical Operations on Arrays

Lesson 4.3 Accessing Elements in Arrays

Lesson 4.4 Arithmetical Operations on Arrays

Lesson 4.5 Plotting Arrays

Answers to Selected Exercises

Lesson 4.1 Creating Arrays

Objectives

• To learn how to create arrays in Matlab manually.

• To learn how to create arrays in Matlab automatically.

Topics

4.1.1 Introduction

4.1.2 Creating Arrays Manually

4.1.2.1 Creating Arrays Manually: Row-By-Row

4.1.2.2 Creating Arrays Manually: Column-By-Column

4.1.3 Creating Arrays Using the repmat Function

4.1.4 Transpose an Array

4.1.5 Changing Array Dimensions Using the reshape Function

4.1.6 Finding the Size of an Array

4.1.7 Converting an ...

Get MATLAB® by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.