Recall & Review
beginner
What is a row vector in MATLAB?
A row vector is a 1-by-n matrix, meaning it has 1 row and multiple columns. For example,
[1 2 3] is a row vector with 3 elements.Click to reveal answer
beginner
What is a column vector in MATLAB?
A column vector is an n-by-1 matrix, meaning it has multiple rows and 1 column. For example,
[1; 2; 3] is a column vector with 3 elements.Click to reveal answer
beginner
How do you create a row vector with elements 4, 5, and 6 in MATLAB?
You write the elements separated by spaces or commas inside square brackets:
v = [4 5 6];Click to reveal answer
beginner
How do you create a column vector with elements 4, 5, and 6 in MATLAB?
You write the elements separated by semicolons inside square brackets:
v = [4; 5; 6];Click to reveal answer
beginner
What is the difference between a row vector and a column vector in MATLAB?
A row vector has one row and many columns, written as
[a b c]. A column vector has many rows and one column, written as [a; b; c]. They look different and behave differently in operations.Click to reveal answer
Which of the following is a row vector in MATLAB?
✗ Incorrect
A row vector has elements in one row separated by spaces or commas: [1 2 3].
How do you separate elements to create a column vector in MATLAB?
✗ Incorrect
Semicolons separate rows, so [1; 2; 3] creates a column vector.
What is the size of a row vector with 5 elements?
✗ Incorrect
A row vector with 5 elements has 1 row and 5 columns, so size is 1-by-5.
What is the size of a column vector with 4 elements?
✗ Incorrect
A column vector with 4 elements has 4 rows and 1 column, so size is 4-by-1.
Which MATLAB code creates a column vector?
✗ Incorrect
Using semicolons creates a column vector: [7; 8; 9].
Explain how to create row and column vectors in MATLAB and how they differ.
Think about how elements are separated inside square brackets.
You got /4 concepts.
Describe the size (dimensions) of row and column vectors and why it matters.
Remember rows and columns count.
You got /4 concepts.