Houston spring final exam
ENGI 1331 Final Exam Study Guide (Spring 2026)
Course Description: Introduction to computing; matrix arithmetic, programming
constructs, algorithms, and graphical visualization using MATLAB; problem solving
in engineering analysis .
Module 1: Scripts, Variables, & Basic I/O (Questions 1-30)
Question 1: What symbol is used in MATLAB to indicate a comment?
A. //
B. #
C. %
,D. <!--
Correct Answer: C. %
Rationale: The percent sign (%) is used to denote comments in MATLAB. Any text
that follows on the same line is ignored by the interpreter.
Question 2: What is the output of the following command? x = 3; y = 2; z = x^y;
disp(z)
A. 5
B. 6
C. 8
D. 9
Correct Answer: D. 9
,Rationale: The ^ operator is exponentiation. x^y is 3^2 which equals 9. The
semicolon suppresses output, but disp(z) displays the result.
Question 3: Which command clears all variables from the MATLAB workspace?
A. clc
B. clear
C. clf
D. delete
Correct Answer: B. clear
Rationale: clear removes all variables from the workspace. clc clears the
command window but not variables, while clf clears figures.
Question 4: Which command clears the command window?
, A. clear
B. clean
C. clc
D. delete
Correct Answer: C. clc
Rationale: clc stands for "clear command window". The workspace variables
remain unaffected.
Question 5: How do you suppress output of a calculation in MATLAB?
A. Add // at the end
B. Add ; at the end