Bird
0
0

What will be the output of this MATLAB code?

medium📝 Predict Output Q5 of 15
MATLAB - Linear Algebra
What will be the output of this MATLAB code?
A = [7 8; 9 10; 11 12];
B = A';
disp(size(B));
A[7 8]
B[3 2]
C[2 3]
D[9 10]
Step-by-Step Solution
Solution:
  1. Step 1: Identify size of A

    A has 3 rows and 2 columns, so size(A) = [3 2].
  2. Step 2: Transpose A to get B

    Transpose swaps rows and columns, so size(B) = [2 3].
  3. Final Answer:

    Size of B is [2 3] -> Option C
  4. Quick Check:

    Transpose swaps size dimensions = [2 3] [OK]
Quick Trick: Transpose swaps matrix dimensions [OK]
Common Mistakes:
  • Confusing original size with transposed size
  • Mixing rows and columns
  • Assuming size unchanged

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More MATLAB Quizzes