0% found this document useful (0 votes)
8 views

MEE1006_MATLAB for Engineers_SET-3

The document outlines the examination structure for the MATLAB for Engineers course, including sections with multiple-choice questions, coding tasks, and theoretical problems. It specifies the maximum marks for each section and provides a series of questions that test students' understanding of MATLAB programming concepts and applications. The exam is scheduled for January 2025 and is intended for B.Tech students in the Department of Mechanical Engineering at SAMM.

Uploaded by

QuizMM Muj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

MEE1006_MATLAB for Engineers_SET-3

The document outlines the examination structure for the MATLAB for Engineers course, including sections with multiple-choice questions, coding tasks, and theoretical problems. It specifies the maximum marks for each section and provides a series of questions that test students' understanding of MATLAB programming concepts and applications. The exam is scheduled for January 2025 and is intended for B.Tech students in the Department of Mechanical Engineering at SAMM.

Uploaded by

QuizMM Muj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Name:

Enrolment No:
Odd Semester End Term Examination, January 2025
Faculty of Engineering, SAMM
Department of Mechanical Engineering
B.Tech
Course Code: MEE1006/ME1006 Course: MATLAB for Engineers Semester: I
Time: 03 hrs. Max. Marks: 80
Instructions: * All questions are compulsory * Missing data, if any, may be assumed suitably * Calculator is not allowed.
SECTION A (Max. Marks 10)
S.No. Description Marks CO
Q. A1 Choose the MATLAB command for finding out the derivative of the polynomial p? 2 1
a. der(p)
b. polyder(p)
c. derivative(p)
d. None of these
Q. A2 How many times will the loop execute? Coose the correct option. 2 1, 2

for i = 1:0.5:5
end
a. 9 times
b. 10 times
c. 11 times
d. 12 times
Q. A3 What will be the result of 5 < 3 | 7 > 6 in MATLAB? 2 2, 3
a. 1
b. 0
c. true
d. false
Q. A4 What is the output of the following MATLAB code? 2 1, 2
p = [1 2 1];
v = polyval(p, 2);
disp(v);

Q. A5 What will be the output of the following MATLAB code? 2 1, 3

A=[3; 6; 9; 12; 15];


B=A’;
disp(B)

Page 1 of 3
SECTION B (Max. Marks 30)
Q. B1 Write a MATLAB code to create the following matrices O and P: 6 1, 2

1 1 1 1 2 3
𝑂 = [4 8 10], 𝑃 = [41 51 61]
9 18 27 36 18 9
Write a code to find a matrix ‘Q’ by addition of matrix ‘P’ and transpose of ‘O’, also
write a code to delete the third row from the obtained matrix ‘Q’.

Q. B2 Write a MATLAB code to plot both the functions 𝑦 = 𝑠𝑖𝑛(𝑥) and 𝑦 = 𝑐𝑜𝑠(𝑥) on the 6 1, 2
same graph for the values of x ranging from 0 to 2π. Label the axes as ‘y’ and ‘x’ with
a title of the plot as ‘Sine and Cosine Functions’. Also write a code to show the sine
and cosine functions with red and blue lines respectively.

Q. B3 Write a MATLAB code to plot the function, 𝑓(𝑥) = 𝑥 2 cos (1 + 𝑥 2 ) for ‘x’ in the 6 2
range [0, 2𝜋] using an anonymous function.

Q. B4 Using the MATLAB built-in functions (zeros, ones, eye), create the following matrix 6 1, 4

0 0 0 1 1
0 0 0 1 1
1 0 0 0 0
𝐴= 0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
[0 0 0 0 1]
Q. B5 Write a MATLAB code to create a 5×5 matrix where the (𝑖, 𝑗)th element is 𝑖 2 + 𝑗 2. 6 2, 4
Also perform the following operations:
a. Find the sum of all elements in the matrix.
b. Extract a submatrix consisting of the first three rows and first three columns

SECTION-C (Max. Marks 20)


Q. C1 Using MATLAB, find the roots of two polynomials, 𝑃1 (𝑥) = 8𝑥 7 − 5𝑥 4 + 2𝑥 2 − 10 1, 2
7 and 𝑃2 (𝑥) = 3𝑥 7 − 5𝑥 3 − 𝑥 + 3, add the roots of both polynomials and assume
it roots of a new polynomial. Find the polynomial coefficient vector for added roots.
Write a code to further plot the obtained polynomial value for x ranging from -2 to 2
with an interval of 0.2 with black color and dashed line. Label the axes and mark
title as ‘New Polynomial’.
Q. C2 Construct an anonymous function to compute the equation given below in MATLAB. 10 2, 3
Use the anonymous function to find the values of 𝑓(𝑥) in the range 0 ≤ 𝑥 ≤ 3 with a
step size of 0.1. Also write a code to obtain the results in the form of a ‘Table’ having
values of 𝑥 and 𝑓(𝑥).
𝑓(𝑥) = 𝑥 3 − 𝑥 − 2

Page 2 of 3
SECTION-D (Max. Marks 20)
Q. D1 You are studying the growth of a bacterial population over time, which follows an 10 3, 4
exponential growth pattern. You are given the following data:

Time (hours) 0 1 2 3 4 5
Population 5 10 20 40 80 160

Use MATLAB to fit an exponential curve and predict the population at t=6 hours.

Q. D2 Write a MATLAB script to analyze the cooling of an object using Newton’s Law of 10 3, 4
Cooling. The formula is 𝑻(𝒕) = 𝑻𝒆𝒏𝒗 + (𝑻𝒐 − 𝑻𝒆𝒏𝒗 ) ⋅ 𝒆−𝒌𝒕 , where 𝑻𝒐 is the initial
temperature (100 °C), 𝑻𝒆𝒏𝒗 is the environmental temperature (20 °C), ‘k’ is the
cooling constant (0.02), and ‘t’ is time in seconds (0 sec). Use a while loop to compute
and display the temperature every second until it drops below 5 °C above the
environment.

Page 3 of 3

You might also like