Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Dashboard ► Campus based Instruction ► Non-Specific Programs ► 2021-22 Semester 1 ►

MERGED Courses ► S1-21_MERGEDMR ► General ► Lab Quiz 1

Question 1 The purpose of “cd ..” command in MATLAB is

Not yet answered


Select one:
Marked out of 0.20
a. To come out of all the folders

b. To create new folder in the current working directory

c. To come out of C drive 

d. To come out of one


folder 

Question 2 In a MATLAB program


variable “E” is defined as 3×3 matrix, to get transpose of that matrix
Not yet answered what is
the command?

Marked out of 0.20


Select one:
a. E''
b. E'

c. E-1
d. Et

Question 3 If all variables of a MATLAB


program must be available in the workspace, which type of file
Not yet answered must be created?

Marked out of 0.20


Select one:
a. Both Function and Script file
b. Script file 

c. Class file 

d. Function file

Question 4 For a function file input arguments can be

Not yet answered


Select one:
Marked out of 0.20
a. a Number  

b. an Array 

c. a Matrix  

d. anything mentioned above


Question 5 To get output plot as mentioned in the below figure, which of the following
MATLAB program
Not yet answered is correct

Marked out of 0.20

Select one:
a. A=[1,2,3,4,5,6,7,8,9,10];

B=[2,5,6,4,7,8,10,7,4,2];

plot(A, B,'k--',A, B,'ro')

b. A=[1,2,3,4,5,6,7,8,9,10];

B=[2,5,6,4,7,8,10,7,4,2];

plot(A, B,'k-',A, B,'ro')


c. A=[1,2,3,4,5,6,7,8,9,10];

B=[2,5,6,4,7,8,10,7,4,2];

plot(A, B,'b--',A, B,'ro')

d.   A=[1,2,3,4,5,6,7,8,9,10];

B=[2,5,6,4,7,8,10,7,4,2];

plot(A, B,'b-',A, B,'ro')


Question 6

Not yet answered

Marked out of 0.20 In a Matlab program A is defined as   

if we get output as 

then what should be the code?

Select one:
a. A .^2  

b.  A×^2
c. A^2       

d.  A*^2   

Question 7 What is the output of the following code?

Not yet answered           a=2;


Marked out of 0.20           for i=2:5
          a=a+1;
          end

Select one:
a. a=2 

b. a=7   

c. a=6  

d.  a=8
Question 8 Syntax to perform logic of “OR” in MATLAB is

Not yet answered


Select one:
Marked out of 0.20
a. A ! B   

b. A \ B

c. A / B   

d. A | B  

Question 9
What is the output of
the following code?
Not yet answered
         
Marked out of 0.20
          A=[1,2,3;4,5,6;7,8,9];
          Sum(A,1)

Select one:
a.  [12;15;18]  
b. [6;15;24]

c. [6,15,24]   

d. [12,15,18]  

Question 10 What is the output of the command t=[1:3:11]

Not yet answered


Select one:
Marked out of 0.20
a. t= [1,3,6,9,12]  
b. t=[1,4,7,10] 

c. t=[1,4,7]
d.  t=[1,4,7,10,11]  

You might also like