Bird
0
0

Given C = {5, 10; 15, 20};, what does C(2,1) return?

easy📝 Conceptual Q2 of 15
MATLAB - Cell Arrays and Structures
Given C = {5, 10; 15, 20};, what does C(2,1) return?
AA cell array containing the number 15
BA cell array containing the number 20
CThe number 20
DThe number 15
Step-by-Step Solution
Solution:
  1. Step 1: Identify indexing type

    Parentheses () indexing returns a cell array subset, not the content.
  2. Step 2: Apply indexing to given cell array

    C(2,1) returns a 1x1 cell array containing the element at row 2, column 1, which is 15.
  3. Final Answer:

    A cell array containing the number 15 -> Option A
  4. Quick Check:

    Parentheses indexing returns cell array = D [OK]
Quick Trick: Parentheses keep cell structure, curly braces extract content [OK]
Common Mistakes:
  • Expecting a numeric value instead of a cell
  • Mixing up row and column indices

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More MATLAB Quizzes