CEN 100 Lecture Notes - Lecture 2: Row And Column Vectors, Working Directory, Microsoft Excel
Document Summary
Like most other programming languages, the matlab language provides mathematical expressions, but unlike most programming languages, these expressions involve entire matrices. Matlab does not require any type declarations or dimension statements. When matlab encounters a new variable name, it automatically creates the variable and allocates the appropriate amount of storage. If the variable already exists, matlab changes its contents and, if necessary, allocates new storage. For example, num_students = 25 creates a 1-by-1 matrix named num_students and stores the value 25 in its single element. To view the matrix assigned to any variable, simply enter the variable name. Variable names can contain up to 63 characters. Variable names must start with a letter followed by letters, digits, and underscores. Matlab uses conventional decimal notation, with an optional decimal point and leading plus or minus sign, for numbers. Scientific notation uses the letter e to specify a power- of-ten scale factor. Imaginary numbers use either i or j as a suffix.