
ENGE 1114: Final Exam Study Guide
70% Programming and Algorithm Development
15% Graphics Communication
15% Design
Programming and Algorithm Development
MATLAB Lecture 1:
- A semicolon will suppress the output
- āwhoā MATLAB command returned the names of the variables in your current MATLAB project
- MATLAB ignores spaces in code
- Exponential is performed via the carrot (^) symbol
- āpiā built in MATLAB
- Algebraic hierarchy is observed
- āfprintfā, when you tell MATLAB what you want for it to output ā%f, variableā will enter that
variableās value
- āsqrtā = square root
- The special formats \n, \r, \t, \b, \f can be used to produce linefeed, carriage return, tab,
backspace, and form feed characters respectively. Use \\ to produce a backslash character and
%% to produce a percent character
- %5.0f format- no integers to the right of the decimal
- %8.4f format- four digits to the right of the decimal point and, including leading spaces, consists
of eight spaces
- If you havenāt provided enough space for the answer MATLAB will come up with its own format
- āclcā clears the command window and can be used in your program
- %0.3f format specifier is okay
- The percent sign (%) allows you to insert comments in your code (necessary)
- Can both record and play sounds via MATLAB
MATLAB Lecture 2:
- May want to put āclcā in your program after introductory text
- All text entered in to MATLAB must be put in single quotes
- āsā ā text string format specifier
- Text strings are dealt with as single elements
- Relational operator, ==, compared two elements, true or false
- 0- False
- 1- True
- Relational Operators: <, <=, >, >=, ==