Introduction To MATHLAB and Its Application
Introduction To MATHLAB and Its Application
ASSESSMENT TEST
Note: Answer all the questions. Put a tick (√) in the correct answer. Each question carries 2
Marks
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
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
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
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
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
32. If a character input is given to a command which only takes integers, it’ll always give an error.
a) True
b) False
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
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
50. All matrices are vectors but all vectors are not matrices in MATLAB.
a) True
b) False
No of Questions Attended Marks Scored:
Name:
Date: