Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
42 views

Introduction To MATHLAB and Its Application

VAC

Uploaded by

naacvins23
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Introduction To MATHLAB and Its Application

VAC

Uploaded by

naacvins23
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 10

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Course Code & Title: IMAECE – INTRODUCTION TO MATHLAB AND ITS


APPLICATION
Academic Year: 2020- 2021 Duration: 7th Sep ’20 – 12th Sep ’20 Sem: III, V & VII

Date of Test: Student Register Number: Student Name:

ASSESSMENT TEST

Note: Answer all the questions. Put a tick (√) in the correct answer. Each question carries 2
Marks

1. MATLAB stands for?


a) matrix laboratory
b) math library
c) matric library
d) matrix library

2. Which command is used to clear a command window?


a) clear
b) close all
c) clc
d) clear all

3. To determine whether an input is MATLAB keyword, command is?


a) iskeyword
b) key word
c) inputword
d) isvarname
4. Command used to display the value of variable x.
a) displayx
b) disp(x)
c) disp x
d) vardisp(‘x’)

5. Command is used to save command window text to file.


a) saveas
b) texttofile
c) diary
d) todiary

6. To stop the execution of a MATLAB command, used keys?


a) ctrl+c
b) ctrl+s
c) ctrl+b
d) ctrl+enter

7. Which is the invalid variable name in MATLAB?


a) x6
b) last
c) 6x
d) z

8. If one operand is a scalar and the other is not, then MATLAB applies the scalar to every
element of the other operand. This property is known as ______________
a) operand divergence
b) scalar expansion
c) vector expansion
d) dimension declaration

9. Matrix operations follow the rules of linear algebra and are not compatible with
multidimensional arrays.
a) true
b) false
10. Largest and smallest values for integer classes is 127 to -128.
a) True
b) False

11. Compute 24 modulo 5.

b = mod (24, 5)

a) b= 3
b) b =4
c) b =5
d) b =6

12. What is the difference between syms ‘x’ and sym ‘x’?
a) there is no difference, they are the same functions
b) they are equivalent
c) syms ‘x’ makes the declaration long lasting while sym ‘x’ makes the declaration short lasting
d) syms ‘x’ makes the symbol short lasting while sym ‘x’ makes the declaration long lasting

13. What is the nature of the arrangement of the coefficients to store the following expression in
MATLAB?

y= 3x5 + x2 + 6
a) y=[3,0,0,1,0,6]
b) y=[3,1,6]
c) y=[3;0;0;1;0;6]
d) y=[6,0,1,0,0,3]

14. In the function vpa(‘981’,10), why do we put 981 within inverted commas?
a) We can choose to not put the value within a pair of single inverted comma
b) We do it so that we don’t get an approximated value
c) We do it to get the exact value as MATLAB computes exact values, of numerical expressions, when
declared within a string
d) We do it to get a floating-point approximated value, approximated to 14 digits

15. What happens if we don’t assign a variable to an expression which evaluates a numerical
value?
a) MATLAB shows error
b) Nothing happens
c) The evaluated values are assigned to a variable ans automatically
d) Depends on the numerical value

16. MATLAB sees a ________ ordered variable as a vector of dimension n*1.


a) nth, (n+2)th
b) nth, (n+3)th
c) (n-1)th, nth
d) nth, (n-1)th

17. Name the functions used, for multiplication and division of two polynomials in MATLAB.
a) conv() and deconv()
b) mult() and div()
c) conv() and div()
d) mult and div

18. How can the formulation of polynomial be done from its roots?
a) poly(r), r is a row vector, containing the roots of the polynomial
b) poly([roots as a column vector])
c) poly([roots as a row vector])
d) poly([roots in descending order as a coloumn vector])

19. The function to evaluate the value of a polynomial, l for a constant value of the independent
variable(say a) in the polynomial is ______
a) poly(p,a), p is a row vector
b) polyder(p)
c) polyint(p)
d) polyval(c,a), c is a row vector

20. What is the disadvantage of the whos function in MATLAB?


a) It does not show the values of the variable
b) It does not show the size of the variable
c) It does not show the class of the variable
d) It does not show the name of the variable

21. What is the replacement for the whos function?


a) Workspace window
b) Command window
c) Current folder window
d) Remembering all the variables used

22. What does the Workspace show?


a) Attributes of variables, functions from command window
b) Attributes of variables, script files from command window
c) Attributes of variables, script files, functions from command window
d) Attributes of variables from command window

23. What is the size of double and symbolic variables holding integer constants?
a) 8 bytes and 16 bytes
b) 16 bytes and 112 bytes
c) 32 bytes and 26 bytes
d) 23 bytes and 112 bytes

24. What is the difference between who and whos command?


a) The former shows the names of the variables being used while the latter shows the details of the
variables in the ongoing program
b) The latter shows the names of the variables being used while the former shows the details of the
variables in the ongoing program
c) No difference at all
d) There is no such function as who and whos

25. How would you express a pi as a character and an integer? Choose the correct code.
a) a=pi;b=’pi’;
b) a=22/7; b=pi;
c) a=3.1415; b=22/7;
d) a=3.1429;b=’pi’;
26. What is the error in the code?

a=[[1;2];(2,3)]
a) Third brackets are wrong
b) The semicolon within the second third brackets
c) There is no error
d) Error: Expression or statement is incorrect–possibly unbalanced

27. What is the output of the following code?


system(cmd)
a) Opens command prompt
b) Opens command prompt in a separate window
c) Opens command prompt in MATLAB
d) Error

28. What is the output of the following code?


Command history[ ]
a) Error
b) Shows command history
c) Shows the previous command used
d) Prints all the commands used for the current session

29. What is the output of the following code?


p= input[''];
a) Asks for an input
b) Error in the input
c) Error due to syntax
d) Cannot be determine

30. What is the output of the following code?


sumsqr([1 2; 'NaN' 4])
a) 21
b) Error due to NaN
c) Error due to ‘NaN’
d) 9
31. The uniform distribution can range from -infinity to 0 or 0 to Infinity but not from -infinity to
infinity.
a) True
b) False

32. If a character input is given to a command which only takes integers, it’ll always give an error.
a) True
b) False

33. Which function is preferable to find the magnitude of a complex number?


a) abs()
b) sqrt()
c) cart2pol()
d) MATLAB does not support complex arguments

34. Which is an escape sequence constant?


a) Esc
b) /n
c) \b
d) nargout

35. All MATLAB computations are done in


a) Single Precision
b) Double Precision
c) Linear accuracy
d) Multi-level precision

36. Which symbol is used to initialize a variable?


a) =
b) ->
c) ==
d) init

37. Choose the correct option.


a) any() shows all the elements in a matrix while all() shows every element of a vector
b) any() is ‘true’ if elements in a vector is zero
c) all() is ‘true’ if every element in a vector is non zero
d) all() is ‘true’ if every element in a vector is 0

38. What is the difference between the expressions (9*1-8) & (9-1*8)?
a) Computational difference
b) Final results are different
c) No difference
d) Cannot be determined

39. The expression cos(90) is equal to1 in MATLAB.


a) True
b) False

40. What is the difference between sqrt(10) and sqrt(sym(10))?


a) There is no difference
b) sqrt(sym(10)) is incorrect
c) There is no function as sqrt
d) sqrt(10) returns exact value while sqrt(sym(10)) returns 10(1/2)

41. The solve[] command can do which of the following things?


a) Produce the exact solution
b) Produce a symbolic solution
c) Produces exact roots
d) Produces complex roots

42. What happens if dsolve does not return any numerical solution?
a) The equations have no solution
b) The equations have a trivial solution
c) The equations have infinite no. of solutions
d) The equation has to be solve separately

43. If solve does not return any solution, what does it imply?
a) The equation has no definite solution
b) The equation has a solution for a specific interval
c) The equation may be solvable but the function ‘solve’ cannot produce a solution
d) There is no function ‘solve’
44. Vectors depend upon brackets while scalars don’t.
a) True
b) False

45. What is the advantage of MATLAB over other computing software with matrix dimensions?
a) No advantage
b) Real time pre-defined memory allocation
c) Real time user-defined memory allocation
d) Matrix operations are easily computed

46. What is the function used to multiply a matrix, A, with itself n times?
a) mtimes(A,n)
b) ntimes(A,n)
c) mtimes(n,A)
d) mtimes(A^n)

47. If A and B are two matrices, such that a./b=b.\a, what is concluded?
a) Nothing special
b) A = AT
c) A = A-1
d) A = A

48. 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 vector

49. What is the output of the following code?


clear ALL
a) Clears the workspace
b) Clears the matrices
c) Clears the vectors
d) Clears ALL

50. All matrices are vectors but all vectors are not matrices in MATLAB.
a) True
b) False
No of Questions Attended Marks Scored:

Student Signature: Signature of Evaluator:

Name:

Date:

You might also like