O'Reilly logo

MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] by Manoj Kumar Sharma, Ashok Kumar Goel, Raj Kumar Bansal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.4. Constants and Variables

Constants refer to fixed values which do not change during the execution of a program. Constants can be of two types:

2.4.1. Numeric Constants

Numeric constants are classified into three types, that is integer constants, real constants and complex constants. However, MATLAB does not differentiate between integer and real constants during execution.

2.4.1.1. Integer Constants/Numbers

Integer constants/numbers consist of a set of digits, 0 through 9, with an optional ‘−’ or ‘+’ sign. Some valid examples of integer constants are as follows:

456−120+34234567

Spaces, commas and non-digit characters are not allowed between digits. Some examples of invalid integer constants are as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required