InterviewPitch

Land the job you want — prepare
with Real interviews Q&A

Curated interview questions, company-wise guides and coding rounds. Practice mock interviews, improve with feedback, and track your progress.

Q&A
Top curated interview packs
Company-wise & role-wise packs, quality assured.
Mock interview
AI scoring
Coding rounds
Top 10 sets
Beginner
1. What is MATLAB?
MATLAB (Matrix Laboratory) is a high-level programming language and environment developed by MathWorks used for numerical computing, data analysis, visualization, and algorithm development.
Beginner
2. What are MATLAB variables?
Variables in MATLAB are used to store data. They are dynamically typed and do not require explicit declaration.
Beginner
3. What is a matrix in MATLAB?
A matrix is the basic data type in MATLAB. Everything in MATLAB is treated as a matrix or array.
Beginner
4. How do you create a row vector?
a = [1 2 3 4];
Beginner
5. How do you create a column vector?
a = [1; 2; 3; 4];
Beginner
6. What is the use of semicolon (;) in MATLAB?
It suppresses the output display in the command window.
Beginner
7. How do you write comments in MATLAB?
Single-line comment: % This is a comment
Intermediate
8. What is a script in MATLAB?
A script is a file containing a sequence of MATLAB commands executed in order.
Intermediate
9. What is a function in MATLAB?
A function is a reusable block of code that accepts inputs and returns outputs.
Intermediate
10. Difference between script and function?
Scripts share workspace variables, while functions have their own local workspace.
Intermediate
11. How do you create a function?
function y = squareNum(x) y = x^2; end
Intermediate
12. What is indexing in MATLAB?
Indexing is used to access elements in arrays using row and column positions.
Intermediate
13. What is the colon operator?
It generates sequences. Example: 1:5 returns [1 2 3 4 5].
Intermediate
14. What is a cell array?
A cell array can store different data types in each cell.
Intermediate
15. What is a structure in MATLAB?
A structure stores data in fields. Example: person.name = 'John';
Advanced
16. What is vectorization in MATLAB?
Vectorization replaces loops with matrix operations for better performance.
Advanced
17. What is handle vs value className?
Value classNamees copy data on assignment. Handle classNamees reference the same object.
Advanced
18. What is sparse matrix?
A sparse matrix stores only non-zero elements to save memory.
Advanced
19. What is Simulink?
Simulink is a MATLAB-based graphical tool for modeling and simulating dynamic systems.
Advanced
20. What is MEX file?
A MEX file allows C/C++ code to run inside MATLAB for performance improvement.
Coding Round
41. Find factorial using loop
n = 5; fact = 1; for i=1:n fact = fact * i; end
Coding Round
42. Reverse a vector
a = [1 2 3 4]; rev = fliplr(a);
Coding Round
43. Check prime number
n=7; isprime(n)
Coding Round
44. Sum of array elements
a=[1 2 3 4]; s=sum(a);
Coding Round
45. Find maximum element
maxVal = max(a);
Coding Round
46. Transpose matrix
A = [1 2;3 4]; B = A';
Coding Round
47. Plot a sine wave
x=0:0.1:2*pi; y=sin(x); plot(x,y);
Coding Round
48. Create identity matrix
I = eye(3);
Coding Round
49. Find length of string
str = 'Hello'; len = length(str);
Coding Round
50. Swap two numbers
a=5; b=10; temp=a; a=b; b=temp;