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

20ec0454 Matlab Programming Question Bank

Uploaded by

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

20ec0454 Matlab Programming Question Bank

Uploaded by

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

R20 20EC0454-MATLAB PROGRAMMING

SIDDHARTH INSTITUTE OF ENGINEERING & TECHNOLOGY


(AUTONOMOUS)
(Approved by AICTE, New Delhi& Affiliated to JNTUA, Ananthapuramu)
(Accredited by NBA for Civil, EEE, Mech., ECE & CSE)
(Accredited by NAAC with ‘A+’ Grade)
Puttur -517583, Tirupati District, A.P. (India)
QUESTION BANK (DESCRIPTIVE)
Subject with MATLAB PROGRAMMING (20EC0454) Course & Branch B.Tech. – CSE, CSIT
Code
Year & Sem IV-B.Tech. & I-Sem Regulation R20
UNIT-I
INTRODUCTION TO MATLAB
1 a Define MATLAB and explain its features. [L1][CO1] [4M]
b Illustrate the MATLAB Default Desktop Window and Explain each interactive [L3][CO2] [8M]
session.
2 a Explain how to solve Complex Number equations by using MATLAB with an [L2][CO1] [6M]
example.
b What are the good programming practices for MATLAB? [L4][CO3] [6M]
3 a What are the menus and tool bars available in MATLAB and Explain with [L2][CO3] [6M]
suitable diagram.
b How MATLAB handling the arrays and compute the following array in [L3][CO2] [6M]
MATLAB w=5 sin u for u = 0, 0.1, 0.2, . . . 10.
4 a Use MATLAB to Interpret the roots of the polynomial 290-11x +6x2 +x3. [L3][CO2] [6M]
b Illustrate the MATLAB plotting commands with examples. [L4][CO3] [6M]
5 a Describe and input and output commands used in MATLAB. [L2][CO1] [6M]
b Consider the following set of equations and Write MATLAB script to solve it. [L3][CO2] [6M]
6x - 12y + 4z = 70
7x - 2y + 3z = 5
2x + 8y - 9z = 64
6 a List the effective use of Script Files? [L1][CO1] [6M]
b Discuss MATLAB search Path. [L2][CO2] [6M]
7 List the different ways that you can get help in MATLAB. Write brief notes on [L1][CO3] [12M]
MATLAB help system.
8 a What are the Steps involved in engineering problem solving? [L2][CO2] [6M]
b How to debugging the script files in MATLAB? [L3][CO1] [6M]
9 a Compute volume of sphere of radius 5 cm using a MATLAB script. [L3][CO4] [6M]
b List applications, advantages, and disadvantages of MATLAB. [L2][CO1] [6M]
10 Plot the following functions y = √𝑥 and z=4 sin3x for 0≤X≤5 in MATLAB. [L1][CO2] [12M]
R20 20EC0454-MATLAB PROGRAMMING
UNIT –II
ARRAYS
1 a What is an array? Write short notes on one dimensional and two-dimensional [L2][CO1] [6M]
array with an example for each.
b Explain how Array addressing is done in MATLAB with examples. [L5][CO3] [6M]
2 a Discuss Some Useful Array Functions with examples. [L2][CO2] [6M]
b Describe in brief about multidimensional array with examples. [L1][CO1] [6M]
3 a Write Element-by-Element operation on Array Addition and Subtraction. [L3][CO1] [6M]
b For the Given the matrices [L3][CO3] [6M]
2 0 6 1 8 5
X =−5 9 −2 Y=8 3 2
−9 12 6 6 −1 9
Interpret Array Addition and Subtraction using MATLAB.
4 a For the Given the matrices [L2][CO3] [6M]
0 −3 −2 −2 −6 −5
U =6 2 6 V = 9 −6 4
9 7 9 4 1 0
Interpret Array Multiplication using MATLAB.
b Write Element-by-Element operation on Array Multiplication. [L2][CO2] [6M]
5 a Write Element-by-Element operation on Element-by-Element Division. [L3][CO1] [6M]
b The following table gives data for the distance travelled along five truck routes [L2][CO3] [6M]
and the corresponding time required to traverse each route. Use the data to
compute the average speed required to drive each route. Find the route that has the
highest average speed.
1 2 3 4 5
Distance 560 440 490 530 370
(mi)
Time (hr) 10.3 8.2 9.1 10.1 7.5
6 a Given the matrices [L1][CO3] [6M]
21 27 −7 −3
A= B=
−18 8 9 4
Find (i) Their array product,
(ii) Their array right division (A divided by B), and
(iii) ‘B’ raised to the two-power element by element.
b Write Element-by-Element operation on Exponentiation. [L2][CO1] [6M]
7 Describe about MATLAB array and discuss about the following functions with [L1][CO1] [12M]
examples used in MATLAB program: (i) Zeros ( ). (ii) Ones ( ). (iii) Eye ( ).
8 a Distinguish between array multiplication and matrix multiplication with an [L2][CO2] [6M]
example.
b Define Empty array with three examples. [L1][CO5] [6M]
9 a How Polynomial Multiplication and Division performed in MATLAB? Explain [L1][CO1] [6M]
with suitable example.
b What is cell array? Create a cell array for the following table. [L2][CO4] [6M]
R20 20EC0454-MATLAB PROGRAMMING

10 a What is structure array? How does it differ from ordinary arrays and cell arrays? [L1][CO2] [6M]
b Create a structure array to contain the following types of student data: [L3][CO1] [6M]
■ Student name.
■ Social Security number.
■ Email address.
■ Test scores.
Enter the data shown in Figure

UNIT-III
FUNCTIONS AND FILES
1 a Discuss about Exponential and Logarithmic Functions in elementary mathematical [L2][CO3] [6M]
function with appropriate commands.
b Compute the following using MATLAB commands. [L1][CO1] [6M]
a) √−144
b) 𝑒 3𝑦
c) log10(2y)
d) log (-4x)
2 a Explain how complex functions are handled by MATLAB. Give some examples. [L2][CO4] [6M]
b Explain the following MATLAB commands with suitable examples. [L5][CO3] [6M]
a) The round function,
b) The ceil function,
c) The floor function.
3 a Explain how Trigonometric Functions and Hyperbolic Functions are handled by [L2][CO2] [6M]
MATLAB. Give some examples.
b Compute the following using MATLAB. [L1][CO4] [6M]
a) For several values of x in the range 0 ≤ x ≤ 2, confirm that
tan (2 x) = 2 tan x/ (1-tan2 x).
R20 20EC0454-MATLAB PROGRAMMING
b) For several values of x in the range 0 ≤ x ≤ 5, confirm that sin(ix)= i sinh x.
4 a What is User-Defined Functions? Give Some Simple Function Examples [L2][CO1] [6M]
b Write short note on minimizing a function of one variable. [L1][CO2] [6M]
5 a Compute the area A and circumference C of a circle, given its radius(r=4) as an [L2][CO4] [8M]
input argument.
b What are the advantages of User-Defined Functions in MATLAB? [L1][CO2] [4M]
6 a Distinguish between Local Variables and Global Variables. [L2][CO3] [6M]
b Explain about methods for calling functions. [L5][CO2] [6M]
7 What is mean by functions? Explain various types functions in MATLAB with [L1][CO1] [12M]
suitable example.
8 a Explain about Anonymous Functions with suitable example. [L2][CO3] [6M]
b How Multiple-Input Arguments are handled in Anonymous Functions [L1][CO2] [6M]
9 a What are Nested Functions? Explain with suitable example. [L3][CO2] [6M]
b Explain about Private function with suitable example. [L2][CO5] [6M]
10 a Briefly explain importing wizard and excel data files in MATLAB. [L5][CO5] [6M]
b How to Export ASCII Data Files in MATLAB? [L4][CO3] [6M]

UNIT – IV
PROGRAMMING TECHNIQUES AND PLOTTING
1 a How program is designed and developed in MATLAB? [L3][CO1] [6M]
b Compute the perimeter p and the area A of a triangle whose sides are a, b, and c. [L2][CO4] [6M]
The formulas are p=a+b+c, s= (P/2), A=√𝑠(𝑠 − 𝑎)(𝑠 − 𝑏)(𝑠 − 𝑐),with suitable
steps.
2 a Explain about Conditional Operations with suitable example. [L2][CO5] [6M]
b Explain about Iterative Operations with suitable example. [L5][CO3] [6M]
3 a List various relational operators available in MATLAB with detailed [L1][CO1] [6M]
description.
b How Logical Operators and Functions are handled in MATLAB? [L3][CO2] [6M]
4 a If x = [5, -3, 18, 4] and y = [-9, 13, 7, 4], what will be the result of the following [L1][CO1] [6M]
operations? Use MATLAB to check your answer.
a) z = ~y > x
b) z = x & y
c) z = x | y
d) z = xor (x,y)
b Suppose that x = [-9, -6, 0, 2, 5] and y = [-10, -6 2, 4,6]. What is the result of the [L3][CO4] [6M]
following operations? Determine the answers by hand, and then use MATLAB to
check your answers.
a) z = (x < y)
b) z = (x > y)
c) z = (x ~= y)
d) z = (x == y)
e) z = (x > 2)
5 a Explain “ if ” Statement in MATLAB With suitable flow chart. [L5][CO1] [6M]
b Write the following statements to use only one if statement using MATLAB [L3][CO4] [6M]
a) if x < y then, w = xy.
R20 20EC0454-MATLAB PROGRAMMING
-1
b) if a = b then, u= sinh (ab).
6 a Explain “ else ” and “elseif” Statement in MATLAB With suitable flow chart. [L2][CO1] [6M]
b Write a program that accepts a numerical value x from 0 to 100 as input and [L1][CO4] [6M]
computes and displays the corresponding letter grade given by the following table.
a) x ≥90
b) 80 ≤ x ≤ 89
c) 70 ≤ x ≤ 79
d) 60 ≤ x ≤ 69
e) x < 60
a. Use nested if statements in your program (do not use elseif).
b. Use only elseif clauses in your program.
7 a Explain “for loop” Statement in MATLAB With suitable example. [L5][CO3] [6M]
b Write a script file to compute the sum of the first 15 terms in the series 5 k2 -2k, [L2][CO1] [6M]
k=1, 2, 3, . . . , 15.
8 a Write a program using the switch structure to input one angle, whose value may be [L3][CO2] [6M]
45, -45, 135, or -1350, and display the quadrant (1, 2, 3, or 4) containing the angle.
b Explain “ xy Plotting Functions” in MATLAB. [L2][CO1] [6M]
9 a What are the tools available in Interactive Plotting in MATLAB? Give suitable [L1][CO2] [6M]
Example.
b Explain plot commands [L2[CO4] [6M]
a) plot (x,y),
b) title ( )
c) xlabel ( )
d) ylabel ( )
in MATLAB with an example.
10 a Plot the equation y= 0.4 √1.8 𝑥 for 0 ≤ x ≤ 35 and 0 ≤ y ≤ 3.5. [L1][CO5] [6M]
b How to plot Three-Dimensional functions in MATLAB with suitable example. [L2][CO2] [6M]

UNIT – V
LINEAR ALGEBRAIC EQUATIONS
1 a Explain matrix methods for linear equations with example. [L2][CO2] [6M]
b Solve the following equations, using the matrix inverse method. [L3][CO1] [6M]
2x1 + 9x2 =5
3x1 - 4x2 =7
2 a Define Rank of Matrix with suitable example. [L1][CO1] [6M]
b For what values of C will the following set [L2][CO4] [6M]
(a) have a unique solution and
(b) Have an infinite number of solutions?
Find the relation between x1 and x2 for these solutions.
6 x1 + C x2 = 0
2 x1 + 4 x2 = 0
3 a Write MATLAB script using left division method to solve the following set of [L1][CO4] [6M]
equations.
5 x1 - 3 x2 = 21
7 x1 - 2 x2 = 36
R20 20EC0454-MATLAB PROGRAMMING
b For what cases left division method gives error? Explain.
4 a Explain the Reduced Row Echelon Form with an example. [L2][CO3] [6M]
b The following underdetermined equation has an infinite number of solutions exist. [L3][CO4] [6M]
Use the “ rref “ function to obtain the solutions.
2 x1 - 4 x2 + 5 x3 = -4
-4 x1 - 2 x2 + 3 x3 = 4
2 x1 + 6 x2 - 8 x3 = 0
5 a Explain how Cramer’s Rule performed in MATLAB? with an example. [L5][CO1] [6M]
b Find the system of Linear Equations using Cramer’s Rule. [L1][CO6] [6M]
2x + y + z = 3
x–y–z=0
x + 2y + z = 0
6 a Explain Underdetermined Systems with an example. [L5][CO4] [6M]
b The following table shows how many hours reactors A and B need to produce 1 [L4][CO1] [6M]
ton each of the chemical products 1, 2, and 3. The two reactors are available for
40 and 30 hr per week, respectively. Determine how many tons of each product
can be produced each week.
Hours Product 1 Product 2 Product 3
Reactor A 5 3 3
Reactor B 3 3 4
7 a Explain Overdetermined Systems with an example. [L2][CO1] [6M]
b Solve the following equations and discuss the solution for two cases: [L3][CO3] [6M]
c = 9 and c =10.
x1 + x2 = 1
x1 + 2 x2 = 3
x1 + 5 x2 = c
8 a Explain how least square method is helpful to solve over determined Systems. [L2][CO1] [6M]
b Solve the following equations, using the matrix inverse method. [L1][CO3] [6M]
3x1 - 4x2 = 5
6x1 + 8x2 = 2
9 a Discuss in brief about: a) Under determined system b) over determined system. [L2][CO4] [6M]
b List the different methods of transfer functions in MATLAB with examples. [L1][CO1] [6M]
10 a a) Use MATLAB to solve the following equations for x, y, and z as [L4][CO3] [6M]
x - 5y - 2z = 11c
6x + 3y + z = 13c
7x + 3y - 5z = 10c
b) Plot the solutions for x, y, and z versus c on the same plot, for -10 ≤ c ≤10.
b Discuss about computational difficulties using theoretical linear algebra [L2][CO5] [6M]
techniques.

Prepared by: Mr.Raghul G, Mr.S.V.Rajesh Kumar, AP/ECE

You might also like