You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arduinerd edited this page May 24, 2018
·
9 revisions
Data Types
An important thing to note is that you do not need to implicitly declare a type like other languages. MatLab will automatically assign a type based upon the value assigned.
>> x=2; >> whos x
The whos "variable" command will output the variable name, size, memory, class, and attributes. It is important to note that data types are not static and will change if the value assigned is of a different type.
Numbers
All numeric values are automatically stored as doubles otherwise known
Constants
Inf (Infinity) - an example of this would be trying to divide by zero
NaN (Not a Number) - an example of this would be 0/0 or inf/inf
i and j represent the complex constants