BEC358B2
BEC358B2
Note: 01. Answer any FIVE full questions, choosing at least ONE question from each MODULE.
Q.No Question M L CO
MODULE-1
a. Explain the features and capabilities of MATLAB 5 L2 CO1
b. Write a MATLAB commands for following expressions 5 L2 CO1
OR
a. Demonstrate array operations in MATLAB with suitable examples 5 L2 CO1
b. Write a MATLAB commands for following expressions 5 L2 CO1
MODULE-2
a. Write a MATLAB program to plot a circle of unit radius with comments 5 L2 CO2
b. With respect to the MATLAB script files explain the commands 5 L2 CO2
i. to see the variables present in your workspace
ii. to get more information about the variables and the
workspace
3
iii. to see the contents of an M-file without opening the file
with an editor
iv. to look for M-files with keywords in their description
v. to ask the user to input on the screen
OR
a. Write a MATLAB commands to Plot y = sin x, 0 ≤ x ≤ 2π, taking 100 linearly 5 L2 CO2
spaced points in the given interval. Label the axes and put ‘Plot created by
4 your name’ in the title
b. Write a MATLAB function to compute the factorial n! for any integer n. The 5 L2 CO2
Page 01 of 02
BEC358B
input should be the number n and the output should be n!.
MODULE-3
a. What are anonymous functions? Explain with example 5 L2 CO3
b. Create three anonymous functions corresponding to the following expression 5 L2 CO3
OR
a. Explain MATLAB commands to import and export data with suitable example 5 L2 CO3
b. Define the following function symbolically 5 L2 CO3
f(x) = (x2 - 4x) (x2 - 4x + 1) - 20.
i. Write the command for Expand f(x)
ii. Write command to Factorize f using the symbolic function
iii. Write command to Solve the following nonlinear algebraic equations
6 simultaneously.
MODULE-4
a. Write a MATLAB command to 5 L2 CO4
i. Create a nxn matrix
ii. creates an n by n identity matrix.
iii. creates an n by n zero matrix.
iv. creates an n by n unit matrix.
v. to pulls out the diagonal elements
b. Write the output of the following MATLAB commands 5 L2 CO4
7 i. a = 0:10:100
ii. b = 0:pi/50:2*pi
iii. >> d = [2 4 6 8];
>> d1 = [-3 -3 -3];
>> d2 = [-1 -1];
>> D = diag(d) + diag(d1,1) + diag(d2,-2)
iv. B = [ones(3) zeros(3,2); zeros(2,3) 4*eye(2)]
OR
a. Explain the following MATLAB commands with suitable examples. 5 L2 CO4
i. Plot
ii. ezplot
8 iii. fplot
iv. ezpolar
v. ezplot3
b. Explain relational operators in MATLAB with suitable examples. 5 L2 CO4
MODULE-5
Page 02 of 02
BEC358B
a. Describe the anatomy of function file in MATLAB and explain 5 L2 CO5
b. Write a script file named sineseries.m that computes the value of sin(x) at a 5 L2 CO5
given x using n terms of the series expansion of sine function
9
OR
a. Explain MATLAB control flow statements like for-loops, while loops and, of 5 L2 CO5
10 course, if-elseif-else branching with suitable examples
b. Write a short note on MATLAB Profiller. 5 L2 CO5
Page 03 of 02
BEC358B
Model Question Paper-II with effect from 2023-24 (CBCS Scheme)
USN
Note: Answer any FIVE full questions, choosing at least ONE question from each MODULE.
*Bloom’s
Module -1 Taxonomy Marks
Level
Q.01 a With neat diagram explain MATLAB L2 5
b Write a MATLAB program to compute Area = 𝜋𝑟 2 with r = 𝜋 1/3 - 1. (𝜋Is pi in L3 5
MATLAB)
OR
Q.02 a Write a MATLAB program for the equation of a straight line is y = mx + c, L3 5
where m and c are constants. Compute the y-coordinates of a line with slope m =
0.5 and the intercept c = -2 at the following x-coordinates:
x = 0, 1.5, 3, 4, 5 , 7, 9, and 10
b Explain various file types used in MATLAB L2 5
Module-2
Q. 03 a Write a MATLAB programPlot y = sin x, 0< x <2 𝜋, taking 100 linearly spaced L3 5
points in the given interval. Label the axes and put "Plot created by yourname" in
the title.
b Explain the steps involved in creating and executing a function file. L2 5
OR
Q.04 a Write a MATLAB code to create a 4*4 matrix L3 5
b Explain the steps involved in creating and executing a script file. L2 5
Module-3
Q. 05 a Write a MATLAB code to compute the following expression L3 5
f(x)=𝑥 4 − 8𝑥 3 + 17𝑥 2 − 4𝑥 − 20
b Explain how to use publisher from the editor window with example L2 5
OR
Q. 06 a Write a MATLAB code to Solve the following set of simultaneous linear L3 5
algebraic equations.
x+ 3y –z=2
x-y+z=3
3x - 5y =4.
b Explain three different kinds of files for reading data into MATLAB's workspace L2 5
Module-4
Q. 07 a How to name variables, what is the precision of computation and how to recall L3 5
previously typed commands?
b With example explain input in matrices and vectors? L2 5
OR
Q. 08 a Explain the steps in creating vector. L3 5
b Explain built-in functions of MATLAB. L2 5
Module-5
Q. 09 a Explain script files with example. L3 5
b Explain function files with example L2 5
OR
Q. 10 a Explain 2 ways for executing a function. L3 5
b Explain the Recursion in MATLAB. L2 5
Page 01 of 02