Q1
Q1 What is MATLAB primarily used for?
To create web applications
To perform numerical computing, data analysis, and visualization
To manage databases
To develop mobile applications
Q2
Q2 Which of the following is NOT a key feature of MATLAB?
Matrix operations
Graphical data visualization
Developing iOS apps
Built-in toolboxes
Q3
Q3 What does the "clear" command do in MATLAB?
Removes specific variables
Clears all variables from memory
Clears the Command Window
Clears specific variables only
Q4
Q4 Which symbol is used for comments in MATLAB?
#
%
//
!
Q5
Q5 What does MATLAB stand for?
Matrix Laboratory
Matrix Language
Mathematical Laboratory
Mathematical Language
Q6
Q6 Which feature of MATLAB allows the execution of statements from the Command Window without writing a script?
Immediate Execution
Command Execution
Interactive Execution
Dynamic Execution
Q7
Q7 What is the default data type in MATLAB?
double
integer
float
char
Q8
Q8 Which command creates a 3x3 identity matrix in MATLAB?
eye(3)
identity(3)
matrix(3)
ones(3)
Q9
Q9 What error occurs when trying to access an undefined variable in MATLAB?
Syntax error
Out of memory error
Undefined function or variable
Invalid use of operator
Q10
Q10 What does the Workspace in MATLAB display?
Active variables and their values
All scripts
All functions
Command history
Q11
Q11 Which command is used to clear all variables in the Workspace?
clear all
clear variables
reset workspace
clear workspace
Q12
Q12 What is the purpose of the "who" command in MATLAB?
Lists active variables
Deletes active variables
Shows memory usage
Resets the Workspace
Q13
Q13 Which command resets the MATLAB Workspace to its default state?
clear all
clc
clear variables
restoredefaultpath
Q14
Q14 What is the difference between "who" and "whos" in MATLAB?
"who" lists variables; "whos" shows details
Both are identical
"who" shows memory usage; "whos" clears memory
"who" clears variables; "whos" saves them
Q15
Q15 What does the "clc" command do in MATLAB?
Clears the Workspace
Clears the Command Window
Clears variables
Closes all figures
Q16
Q16 How can you view the details of a specific variable in MATLAB?
Using the whos command
Typing the variable name
Using the who command
Both typing the variable name and using whos
Q17
Q17 Which command saves all Workspace variables to a file named "data.mat"?
save variables data.mat
save data.mat
store all data.mat
backup workspace data.mat
Q18
Q18 Why does "Undefined function or variable" occur in MATLAB?
Variable not defined
Function not available in path
Workspace cleared
All of the above
Q19
Q19 How do you define a variable in MATLAB?
Using =
Using :=
Using <-
Using =>
Q20
Q20 What does the "exist" function do in MATLAB?
Checks if a variable or file exists
Deletes a variable
Initializes a variable
Renames a variable
Q21
Q21 How are strings denoted in MATLAB?
Double quotes
Single quotes
Both double and single quotes
None of the above
Q22
Q22 What will the command "x = 5; y = x + 3" result in?
x=5, y=8
x=5, y=3
x=5, y=5
x=8, y=3
Q23
Q23 What is the scope of a variable defined in a script?
Local
Global
Persistent
Temporary
Q24
Q24 What is the default value of an uninitialized variable in MATLAB?
0
NaN
Empty
None
Q25
Q25 Which of the following is true for variable names in MATLAB?
Must start with a letter
Can include spaces
Case insensitive
No length restriction
Q26
Q26 What does the command "zeros(3)" return?
A 3x3 matrix of zeros
A scalar zero
A 3-element vector of zeros
An error
Q27
Q27 How do you create a row vector [1, 2, 3] in MATLAB?
[1, 2, 3]
[1; 2; 3]
{1, 2, 3}
(1, 2, 3)
Q28
Q28 What does the error "Index exceeds matrix dimensions" indicate?
Variable is not defined
Matrix size is too large
Attempting to access an element outside the matrix dimensions
Matrix contains invalid data
Q29
Q29 Why does "Invalid syntax" occur in MATLAB?
Missing semicolon
Unrecognized command
Incorrect operator usage
All of the above
Q30
Q30 Why does "Unexpected MATLAB operator" occur?
Variable not initialized
Invalid operator sequence
Function is undefined
Workspace cleared