1.

What is the difference between a[] and a{}?(a) a[] is for empty cell array while a{} is for empty linear array(b) a[] is for empty linear array while a{} is for empty cell array(c) No difference(d) a[] is an empty row vector while a{} is an empty column vectorThis question was posed to me during an interview for a job.I would like to ask this question from Vectors and Matrices in section MATLAB Basics of MATLAB

Answer»

The correct answer is (b) a[] is for empty linear ARRAY while a{} is for empty CELL array

Explanation: To INITIALISE a cell array, named a, we use the SYNTAX ‘a{}’. If we need to initialise a linear array, named a, we use the syntax ‘a[]’. This is pre-defined in MATLAB.



Discussion

No Comment Found

Related InterviewSolutions