ENGRMAE 10 Lecture 2: MAE10Sp16_Notes02
Document Summary
You may create and use variables in matlab to store data. The variable apple is not the same as the variable apple . Examples of acceptable variables: a, b, c, apple, apple, apple89_3, ilikecheese. Examples of unacceptable variables: 89, 8fish, fis h, pizza! You should choose variable names that are descriptive. Numapple is a variable that stores information about the number of apples. You can check if a variable is acceptable with the isvarname command. This is just one of many built in commands in matlab/octave. Matlab/octave, unlike other languages such as fortran, we do not need to declare the data type of variables (integer, real, etc. ). All variables in matlab/octave are assumed to store floating point data unless otherwise stated (there will be times where we will want to force a variable to be an integer). In fact, you do not even need to declare variables. They are created when you assign them a value.