2

Scalars in Matlab

Chapter Outline

Lesson 2.1 Creating and Naming Matlab Scalar Variables 

Lesson 2.2 Approximation of Numbers and Discrete Mathematical Operations 

Lesson 2.3 Mathematical Expressions for Scalar Variables

Lesson 2.4 Relational and Logical Operations for Scalar Variables

Lesson 2.5 Complex Scalar Variables

Answers to Selected Exercises

Lesson 2.1 Creating and Naming Matlab Scalar Variables

Objectives

• To learn how to create scalar variables using Matlab.

• To differentiate between Matlab special variables and user-defined variables.

Topics

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 ...

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.