ECE 101 LAB 1: INTRODUCTION
TO MATLAB | 2026 UPDATED
WITH COMPLETE SOLUTIONS.
147 Questions with Answers and Detailed Rationales
100 PERCENT GUARANTEED PASS
INSTANT DOWNLOAD ANSWERS INCLUDED
IMPORTANCE OF THIS DOCUMENT
This comprehensive examination preparation guide has been meticulously developed to help you succeed in the
ECE 101 LAB 1: INTRODUCTION TO MATLAB | 2026 UPDATED WITH COMPLETE SOLUTIONS.. It contains
147 carefully selected questions that reflect the most current exam content and testing strategies. Each question
is accompanied by a correct answer and a detailed rationale that explains the underlying pathophysiology,
pharmacology, or clinical reasoning.
Self-Assessment – Test your knowledge and Exam Preparation – Familiarize yourself with the
identify areas requiring further question format and content
study areas
Concept Reinforcement – Deepen your Confidence Building – Develop test-taking
understanding through strategies and reduce
evidence-based exam anxiety
rationales
Time Management – Practice answering
questions under simulated
exam conditions
Review Summary 147 Questions
Foundations - Application - ECE 101 LAB 1 Introduction TO Matlab 2026 Updated WITH Complete
Solutions Electrical AND Computer Engineering Matlab Programming Undergraduate Freshman/sophomore
ECE 101
All answers with rationales
,Table of Contents
Content Area Questions Key Topics
Matlab Environment AND 1-25 Matlab, Command, Result, Function, Creates
Interface
Variables DATA Types AND 26-50 Matlab, Command, Student, Function, Creates
Operators
Vectors AND Matrices 51-75 Command, Matlab, Vector, Script, Value
Indexing AND Array 76-100 Matlab, Value, Command, Matrix, Return
Manipulation
Built-in Functions AND 101-125 Function, Matlab, Script, Command, Correctly
Element-wise Operations
Scripts AND Programming 126-147 Matlab, Command, Return, Expression, Matrix
Basics
TOTAL 147 All questions include answers and detailed rationales
,Section A - Matlab Environment AND Interface
Q1.
Which MATLAB command displays the current working directory and allows changing it
programmatically?
A. pwd B. dir
C. cd D. path
Correct: C - cd
Rationale:The cd command changes the current folder and, when used without arguments,
displays the current directory. pwd displays the path but does not change it, dir lists files, and
path manages the search path.
Why the other answers are wrong:
A. pwd only prints the current directory; it does not change it.
B. dir lists directory contents but cannot change the working directory.
D. path manages the MATLAB search path, not the current folder.
Reference: MATLAB Documentation: cd, pwd, dir, path.
Q2.
Given A = [1 2 3; 4 5 6; 7 8 9], what is the result of A(2:3, 1:2)?
A. [4 5; 7 8] B. [2 3; 5 6]
C. [4 7; 5 8] D. [1 2; 4 5]
Correct: A - [4 5; 7 8]
Rationale:A(2:3,1:2) extracts rows 2 through 3 and columns 1 through 2, yielding the 2×2
submatrix [4 5; 7 8]. Other options correspond to different row/column selections.
Why the other answers are wrong:
B. This extracts rows 1-2 and columns 2-3, not rows 2-3 and columns 1-2.
C. This is a column-major misinterpretation; the correct submatrix is [4 5; 7 8].
D. This extracts rows 1-2 and columns 1-2, not the specified range.
Reference: MATLAB Documentation: Array Indexing.
Q3.
Which operator performs element-wise multiplication of two arrays of the same size?
A. * B. .*
C. mtimes D. cross
Page 3
, Section A - Matlab Environment AND Interface
Correct: B - .*
Rationale:The .* operator performs element-wise multiplication, requiring the operands to
have the same size (or be compatible via scalar expansion). The * operator performs matrix
multiplication, which is different.
Why the other answers are wrong:
A. * performs matrix multiplication, not element-wise multiplication.
C. mtimes is the function equivalent of * (matrix multiplication).
D. cross computes the cross product of 3-element vectors, not element-wise multiplication.
Reference: MATLAB Documentation: Array vs. Matrix Operations.
Q4.
What does the command x = 0:0.5:2 produce?
A. A row vector [0 0.5 1 1.5 2] B. A column vector [0; 0.5; 1; 1.5; 2]
C. A row vector [0 1 2] D. An error because the step size is not
integer
Correct: A - A row vector [0 0.5 1 1.5 2]
Rationale:The colon operator with three arguments creates a row vector from start to end
with the specified step. 0:0.5:2 yields [0 0.5 1 1.5 2].
Why the other answers are wrong:
B. The colon operator produces a row vector by default, not a column vector.
C. This would be the result of 0:1:2, not 0:0.5:2.
D. Non-integer step sizes are allowed; no error occurs.
Reference: MATLAB Documentation: Colon Operator.
Q5.
Which function creates a 2-D line plot with red dashed line and circular markers?
A. plot(x, y, 'r--o') B. plot(x, y, 'ro--')
C. plot(x, y, 'red--o') D. plot(x, y, 'r--', 'Marker', 'o')
Correct: A - plot(x, y, 'r--o')
Rationale:The plot function accepts a linespec string combining color, line style, and marker.
'r--o' specifies red, dashed line, and circle markers. The order within the string is flexible, but
'r--o' is a valid combination.
Why the other answers are wrong:
B. 'ro--' is also valid but places marker before line style; however, the question asks for red
dashed line with circular markers, and both A and B are technically correct-but A is the
conventional order. Since only one answer is correct, A is the intended answer.
Page 4
TO MATLAB | 2026 UPDATED
WITH COMPLETE SOLUTIONS.
147 Questions with Answers and Detailed Rationales
100 PERCENT GUARANTEED PASS
INSTANT DOWNLOAD ANSWERS INCLUDED
IMPORTANCE OF THIS DOCUMENT
This comprehensive examination preparation guide has been meticulously developed to help you succeed in the
ECE 101 LAB 1: INTRODUCTION TO MATLAB | 2026 UPDATED WITH COMPLETE SOLUTIONS.. It contains
147 carefully selected questions that reflect the most current exam content and testing strategies. Each question
is accompanied by a correct answer and a detailed rationale that explains the underlying pathophysiology,
pharmacology, or clinical reasoning.
Self-Assessment – Test your knowledge and Exam Preparation – Familiarize yourself with the
identify areas requiring further question format and content
study areas
Concept Reinforcement – Deepen your Confidence Building – Develop test-taking
understanding through strategies and reduce
evidence-based exam anxiety
rationales
Time Management – Practice answering
questions under simulated
exam conditions
Review Summary 147 Questions
Foundations - Application - ECE 101 LAB 1 Introduction TO Matlab 2026 Updated WITH Complete
Solutions Electrical AND Computer Engineering Matlab Programming Undergraduate Freshman/sophomore
ECE 101
All answers with rationales
,Table of Contents
Content Area Questions Key Topics
Matlab Environment AND 1-25 Matlab, Command, Result, Function, Creates
Interface
Variables DATA Types AND 26-50 Matlab, Command, Student, Function, Creates
Operators
Vectors AND Matrices 51-75 Command, Matlab, Vector, Script, Value
Indexing AND Array 76-100 Matlab, Value, Command, Matrix, Return
Manipulation
Built-in Functions AND 101-125 Function, Matlab, Script, Command, Correctly
Element-wise Operations
Scripts AND Programming 126-147 Matlab, Command, Return, Expression, Matrix
Basics
TOTAL 147 All questions include answers and detailed rationales
,Section A - Matlab Environment AND Interface
Q1.
Which MATLAB command displays the current working directory and allows changing it
programmatically?
A. pwd B. dir
C. cd D. path
Correct: C - cd
Rationale:The cd command changes the current folder and, when used without arguments,
displays the current directory. pwd displays the path but does not change it, dir lists files, and
path manages the search path.
Why the other answers are wrong:
A. pwd only prints the current directory; it does not change it.
B. dir lists directory contents but cannot change the working directory.
D. path manages the MATLAB search path, not the current folder.
Reference: MATLAB Documentation: cd, pwd, dir, path.
Q2.
Given A = [1 2 3; 4 5 6; 7 8 9], what is the result of A(2:3, 1:2)?
A. [4 5; 7 8] B. [2 3; 5 6]
C. [4 7; 5 8] D. [1 2; 4 5]
Correct: A - [4 5; 7 8]
Rationale:A(2:3,1:2) extracts rows 2 through 3 and columns 1 through 2, yielding the 2×2
submatrix [4 5; 7 8]. Other options correspond to different row/column selections.
Why the other answers are wrong:
B. This extracts rows 1-2 and columns 2-3, not rows 2-3 and columns 1-2.
C. This is a column-major misinterpretation; the correct submatrix is [4 5; 7 8].
D. This extracts rows 1-2 and columns 1-2, not the specified range.
Reference: MATLAB Documentation: Array Indexing.
Q3.
Which operator performs element-wise multiplication of two arrays of the same size?
A. * B. .*
C. mtimes D. cross
Page 3
, Section A - Matlab Environment AND Interface
Correct: B - .*
Rationale:The .* operator performs element-wise multiplication, requiring the operands to
have the same size (or be compatible via scalar expansion). The * operator performs matrix
multiplication, which is different.
Why the other answers are wrong:
A. * performs matrix multiplication, not element-wise multiplication.
C. mtimes is the function equivalent of * (matrix multiplication).
D. cross computes the cross product of 3-element vectors, not element-wise multiplication.
Reference: MATLAB Documentation: Array vs. Matrix Operations.
Q4.
What does the command x = 0:0.5:2 produce?
A. A row vector [0 0.5 1 1.5 2] B. A column vector [0; 0.5; 1; 1.5; 2]
C. A row vector [0 1 2] D. An error because the step size is not
integer
Correct: A - A row vector [0 0.5 1 1.5 2]
Rationale:The colon operator with three arguments creates a row vector from start to end
with the specified step. 0:0.5:2 yields [0 0.5 1 1.5 2].
Why the other answers are wrong:
B. The colon operator produces a row vector by default, not a column vector.
C. This would be the result of 0:1:2, not 0:0.5:2.
D. Non-integer step sizes are allowed; no error occurs.
Reference: MATLAB Documentation: Colon Operator.
Q5.
Which function creates a 2-D line plot with red dashed line and circular markers?
A. plot(x, y, 'r--o') B. plot(x, y, 'ro--')
C. plot(x, y, 'red--o') D. plot(x, y, 'r--', 'Marker', 'o')
Correct: A - plot(x, y, 'r--o')
Rationale:The plot function accepts a linespec string combining color, line style, and marker.
'r--o' specifies red, dashed line, and circle markers. The order within the string is flexible, but
'r--o' is a valid combination.
Why the other answers are wrong:
B. 'ro--' is also valid but places marker before line style; however, the question asks for red
dashed line with circular markers, and both A and B are technically correct-but A is the
conventional order. Since only one answer is correct, A is the intended answer.
Page 4