SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Downloaden Sie, um offline zu lesen
Name:
Reg. No.:
END TERM EXAMINATION - JANUARY 2022
SEMESTER-I
(M.Sc.)
Subject Code: 21MAMS106 Duration: 3 hours
Subject: Computer Programming using Max. Marks: 100
MATLAB
Instructions
• All Questions are compulsory
• The Question paper consists of 2 sections - Part A contains 10 questions of 2 marks
each. Part B consists of 5 questions of 16 marks each.
• There is no overall choice. Only Part B question include internal choice.
PART - A
(2 * 10 = 20 Marks)
1. What are the types of loops does MATLAB provides?
2. What is the output of the following code?
A=[1 2 3..
];
3. Which command is used to clear the workspace?
4. Which command will give the square of elements of A = [1 3 5 7]?
5. Write short note on Workspace.
6. Distinguish between array multiplication and matrix multiplication.
7. Summarize the main difference between Scripts and Functions.
8. List out the Relational Operators.
9. What is the error in the following code
x = −1 : 0.1 : 1; y = −10 : 2 : 10; plot(x, y)
10. What are basic conditional statements available in MATLAB?
PART - B
(16 * 5 = 80 Marks)
11. (a) (i) Solve the following system of linear equations with MATLAB in both
ways:
x + y − z = 5; −x − y = 3; y + z = 4.
(ii) Create a 3 × 4 matrix A in which all the elements are 1, and create a
2 × 2 matrix B in which all the elements are 5. Then, add elements to
the matrix A by appending the matrix B such that A will be:
A =






1 1 1 0 0
1 1 1 0 0
1 1 1 0 0
0 0 0 5 5
0 0 0 5 5






OR
(b) What are different major tools within or accessible from the desktop in MAT-
LAB and explain each tool.
12. (a) If
A =


1 2 −1
0 1 1
1 −4 −7


then, write the commands
(i) to extract the sub-matrix with last two-columns of matrix A.
(ii) to delete the second column of matrix A.
(iii) to interchange the rows 1 and 2, of matrix A.
(iv) to find the size of the matrix A.
(v) to extract the diagonal of matrix A.
OR
(b) For matrix
A =


1 4 0
3 −1 −9
0 12 8


Execute the following:
(i)A(2, 1) (ii) A(1, :) = [] (iii) B = A([2, 3], [1, 2])
(iv) C = A([3 1 2], :) (v)A(end : −1 : 1, end)
13. (a) Using a nested for loop, write a MATLAB code to display all the prime num-
bers from 1 to 100.
OR
(b) Using While loop, write a MATLAB Code to calculate factorial (n); n is an
integer. Hence find factorial (7).
14. (a) If f1(x) = x3
− 2x2
+ 12x − 4 and f2(x) = 2x3
− x2
+ 5x − 3, then evaluate
2f1(x) + 4f2(x) on [0, 4]. Also, plot the output.
OR
(b) Determine the real roots of g(x) = x5
− 3x4
− 10x3
+ 27x2
+ 10x − 24 and then
plot the polynomial over the appropriate interval to verify that the polynomial
crosses the x-axis at the real root locations.
15. (a) Discuss in detail the Debugging process.
OR
(b) (i) Write a MATLAB code for plotting the functions y1 = 2e−2x
, y2 =
cos x − sin 3x on the interval [0, 5π] with step size π/10.
(ii) Determine the number of consecutive integer numbers which when added
together will give a value equal to or just less than 210.

Weitere ähnliche Inhalte

Ähnlich wie MSc_I_Sem_End_Sem_Paper_1.pdf

2.Exploration with CAS-I.Lab2.pptx
2.Exploration with CAS-I.Lab2.pptx2.Exploration with CAS-I.Lab2.pptx
2.Exploration with CAS-I.Lab2.pptx
akshatraj875
 
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docxMATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
andreecapon
 
More instructions for the lab write-up1) You are not obli.docx
More instructions for the lab write-up1) You are not obli.docxMore instructions for the lab write-up1) You are not obli.docx
More instructions for the lab write-up1) You are not obli.docx
gilpinleeanna
 
INTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptxINTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptx
Devaraj Chilakala
 

Ähnlich wie MSc_I_Sem_End_Sem_Paper_1.pdf (20)

2.Exploration with CAS-I.Lab2.pptx
2.Exploration with CAS-I.Lab2.pptx2.Exploration with CAS-I.Lab2.pptx
2.Exploration with CAS-I.Lab2.pptx
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
MATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfMATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdf
 
Matlab booklet
Matlab bookletMatlab booklet
Matlab booklet
 
An Introduction to MATLAB for beginners
An Introduction to MATLAB for beginnersAn Introduction to MATLAB for beginners
An Introduction to MATLAB for beginners
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
sol43.pdf
sol43.pdfsol43.pdf
sol43.pdf
 
presentation.pptx
presentation.pptxpresentation.pptx
presentation.pptx
 
Ss matlab solved
Ss matlab solvedSs matlab solved
Ss matlab solved
 
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docxMATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
 
Matlab
MatlabMatlab
Matlab
 
COMPANION TO MATRICES SESSION II.pptx
COMPANION TO MATRICES SESSION II.pptxCOMPANION TO MATRICES SESSION II.pptx
COMPANION TO MATRICES SESSION II.pptx
 
A complete introduction on matlab and matlab's projects
A complete introduction on matlab and matlab's projectsA complete introduction on matlab and matlab's projects
A complete introduction on matlab and matlab's projects
 
Matlab-free course by Mohd Esa
Matlab-free course by Mohd EsaMatlab-free course by Mohd Esa
Matlab-free course by Mohd Esa
 
Matlab practice
Matlab practiceMatlab practice
Matlab practice
 
Introduction to Matlab - Basic Functions
Introduction to Matlab - Basic FunctionsIntroduction to Matlab - Basic Functions
Introduction to Matlab - Basic Functions
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
More instructions for the lab write-up1) You are not obli.docx
More instructions for the lab write-up1) You are not obli.docxMore instructions for the lab write-up1) You are not obli.docx
More instructions for the lab write-up1) You are not obli.docx
 
INTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptxINTRODUCTION TO MATLAB presentation.pptx
INTRODUCTION TO MATLAB presentation.pptx
 
Matlab
MatlabMatlab
Matlab
 

Kürzlich hochgeladen

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Kürzlich hochgeladen (20)

Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

MSc_I_Sem_End_Sem_Paper_1.pdf

  • 1. Name: Reg. No.: END TERM EXAMINATION - JANUARY 2022 SEMESTER-I (M.Sc.) Subject Code: 21MAMS106 Duration: 3 hours Subject: Computer Programming using Max. Marks: 100 MATLAB Instructions • All Questions are compulsory • The Question paper consists of 2 sections - Part A contains 10 questions of 2 marks each. Part B consists of 5 questions of 16 marks each. • There is no overall choice. Only Part B question include internal choice. PART - A (2 * 10 = 20 Marks) 1. What are the types of loops does MATLAB provides? 2. What is the output of the following code? A=[1 2 3.. ]; 3. Which command is used to clear the workspace? 4. Which command will give the square of elements of A = [1 3 5 7]? 5. Write short note on Workspace. 6. Distinguish between array multiplication and matrix multiplication. 7. Summarize the main difference between Scripts and Functions. 8. List out the Relational Operators. 9. What is the error in the following code x = −1 : 0.1 : 1; y = −10 : 2 : 10; plot(x, y) 10. What are basic conditional statements available in MATLAB? PART - B (16 * 5 = 80 Marks) 11. (a) (i) Solve the following system of linear equations with MATLAB in both ways: x + y − z = 5; −x − y = 3; y + z = 4. (ii) Create a 3 × 4 matrix A in which all the elements are 1, and create a 2 × 2 matrix B in which all the elements are 5. Then, add elements to the matrix A by appending the matrix B such that A will be: A =       1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 5 5 0 0 0 5 5       OR (b) What are different major tools within or accessible from the desktop in MAT- LAB and explain each tool. 12. (a) If A =   1 2 −1 0 1 1 1 −4 −7   then, write the commands (i) to extract the sub-matrix with last two-columns of matrix A. (ii) to delete the second column of matrix A. (iii) to interchange the rows 1 and 2, of matrix A. (iv) to find the size of the matrix A. (v) to extract the diagonal of matrix A. OR (b) For matrix A =   1 4 0 3 −1 −9 0 12 8   Execute the following: (i)A(2, 1) (ii) A(1, :) = [] (iii) B = A([2, 3], [1, 2]) (iv) C = A([3 1 2], :) (v)A(end : −1 : 1, end) 13. (a) Using a nested for loop, write a MATLAB code to display all the prime num- bers from 1 to 100. OR (b) Using While loop, write a MATLAB Code to calculate factorial (n); n is an integer. Hence find factorial (7). 14. (a) If f1(x) = x3 − 2x2 + 12x − 4 and f2(x) = 2x3 − x2 + 5x − 3, then evaluate 2f1(x) + 4f2(x) on [0, 4]. Also, plot the output. OR
  • 2. (b) Determine the real roots of g(x) = x5 − 3x4 − 10x3 + 27x2 + 10x − 24 and then plot the polynomial over the appropriate interval to verify that the polynomial crosses the x-axis at the real root locations. 15. (a) Discuss in detail the Debugging process. OR (b) (i) Write a MATLAB code for plotting the functions y1 = 2e−2x , y2 = cos x − sin 3x on the interval [0, 5π] with step size π/10. (ii) Determine the number of consecutive integer numbers which when added together will give a value equal to or just less than 210.