0% found this document useful (0 votes)
512 views5 pages

MATLAB Programming - BEC358B - Important Questions - Module Wise - 1

Uploaded by

aesthetick707
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
512 views5 pages

MATLAB Programming - BEC358B - Important Questions - Module Wise - 1

Uploaded by

aesthetick707
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 5

J N N COLLEGE OF ENGINEERING, SHIVAMOGGA – 577204

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

IMPORTANT QUESTIONS: MODULE – 1

1. Discuss the various output formats of MATLAB.


2. Explain various file types of MATLAB.
3. With a neat diagram, explain the salient features and capabilities of MATLAB.
4. Briefly explain the various windows used in MATLAB.
5. Write a MATLAB program to compute the following quantities:
(i ) Solve, 3x = 17 (ii ) Area =  r 2 with r =  1 3 −1
(iii ) y = cosh 2 x − sinh 2 x with x = 32 (iv) log10 (105 )
(v) e 163

6. Create a vector t with 10 elements: 1,2,3,4……,10. Now compute the following


quantities
(i ) x = t sin(t ) (ii ) y = (t − 1) (t + 1) (iii ) z = sin(t 2 ) t 2
7. Problem No. 3 (Points on a circle), Problem No. 4 (Geometric Series)
J N N COLLEGE OF ENGINEERING, SHIVAMOGGA – 577204

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


IMPORTANT QUESTIONS: MODULE – 2

1. Explain the steps involved in making a 2 – D plot in MATLAB and print it out.
2. Write a MATLAB program to plot y = sin ( x), 0  x  2 taking 100 linearly spaced points
in the given interval. Label the axes and put "Plot created by your name" in the title.
3. Write a MATLAB program to plot y = e −0.4 x sin ( x), 0  x  4 taking 10, 50, and 100
points in the interval.
4. Explain the steps involved in creating script files and executing them in MATLAB.
5. Write a MATLAB script file that, when executed, greets you, displays the date and time,
and curses your favourite TA or professor.
6. Explain with an example, how to write and execute a function file.
7. Write a function factorial to compute the factorial n! for any integer n in MATLAB. The
input should be the number n and the output should be n!
8. Write a function to compute the sum of a geometric series 1 + r + r 2 + r 3 + + r n for a
given r and n. Thus, the input to the function must be r and n and the output must be the
sum of the series.
2 6 1 2  −5 5
9. Let A =   B=  C=   Check some linear algebra rule:
3 9 3 4   5 3
• Is matrix addition commutative? Compute A+B and then B+A. Are the results the
same?
• Is matrix addition associative? Compute (A+B)+C and then A+(B+C) in the order
prescribed. Are the results the same?
• Is multiplication with a scalar distributive? Compute α(A+B) and αA+ αB, taking
α = 5, and show the results are the same.
• Is multiplication with a matrix distributive? Compute A*(B+C) and compare with
A*B+A*C.
J N N COLLEGE OF ENGINEERING, SHIVAMOGGA – 577204

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


IMPORTANT QUESTIONS: MODULE – 3
1. Explain briefly, how to define and use anonymous functions in command – line
computations.
2. Write a MATLAB program to define an anonymous function of two variables
f (  , x) =  x − x 3 and evaluate over a range of x for different values of μ.

3. Write a MATLAB program to create an anonymous function f ( x) = x 2 − sin ( x) + (1 x)


• Find f (0), f (1) and f ( 2) .
• Vectorize f and evaluate f ( x) where x = [0 1  2  ]
4. Explain briefly, how to do simple symbolic algebra in MATLAB.
5. Write a MATLAB program
• To define symbolically the trigonometric expression z = sin( x + y) and expand it.
• To find the second derivative of z with respect to x , i.e., find ( 2 z x 2 )
 2
• Integrate z with respect to x from 0 to π/2, i.e., evaluate 
0
z dx

6. Write a MATLAB program, to solve two simultaneous algebraic equations for x and y:
ax − by + 3 = 0 − − − −(1)
− x + 2ay − 5 = 0 − − − −(2)
Then, substitute the values of x and y just found in expression 1 to check the result and
simplify the answer to see, if it reduces to zero.
7. Explain the three different kinds of files for reading data into MATLAB’s workspace.
8. Write a note on how to navigate through MATLAB directory system and work with files
in a particular location.
J N N COLLEGE OF ENGINEERING, SHIVAMOGGA – 577204

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


IMPORTANT QUESTIONS: MODULE – 4
1. Briefly explain two cases, where initialization of a matrix is always advisable.
2. Identify the output of the following MATLAB commands:
• eye (3)
• B = [ones(3) zeros(3,2); zeros(2,3) 4*eye(2)]
• diag(B)’
• d = [2 4 6 8];
d1 = [-3 -3 -3];
d2 = [-1 -1];
D = diag(d) + diag(d1, 1) + diag(d2, -2)
3. Briefly explain different types of arithmetic operations carried out on matrices using
MATLAB with examples.
4. Briefly explain different types of relational operations carried out on matrices using
MATLAB with examples.
5. Briefly explain different types of logical operations carried out on matrices using
MATLAB with examples.
6. With suitable example, explain the eval function used in MATLAB.
7. With an appropriate example, briefly explain inline functions used in MATLAB.
8. Write a MATLAB program which defines a 3X3 matrix A, for which, find
• Determinant of matrix A
• Eigen values and eigen vectors of matrix A
Using MATLAB commands.
9. Explain the following in MATLAB:
• Saving into and loading from the binary Mat – files
• Importing data files
• Recording a session with diary
10. Explain the following commands in MATLAB:
• fplot
• ezplot
• ezplot3
• ezpolar
• ezsurf
• ezsurfc
J N N COLLEGE OF ENGINEERING, SHIVAMOGGA – 577204

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


IMPORTANT QUESTIONS: MODULE – 5
1. Let us consider the following system of linear equations:
 5 2r r   x1  2
3 6    
 2r − 1  x2  = 3  − − − −(1)
 2 r − 1 3r     
 x3  5 
Write a MATLAB program to solve the above linear equation (1) for x and also calculate
the determinant of the matrix by choosing the value of r = 1.
2. Briefly explain the anatomy of a function file in MATLAB.
3. Explain the two ways of executing a function, whether it is built – in or user –
written.
4. Briefly explain complied (parsed) function: The p – code used in MATLAB.
5. Briefly explain the need for profiler in MATLAB.
6. Briefly explain the loop statement used in MATLAB with examples.
7. Briefly explain the following commands of MATLAB with example:
• Error
• Return
• Break
• Input
8. Write a MATLAB recursive function to compute nth term of Fibonacci sequence.

You might also like