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

Matlab Programming For Numerical Computation - Unit 3 - Module 1 - Introduction To MATLAB

This document discusses an online MATLAB course offered through NPTEL. It provides information on the course outline, modules, lectures, tutorials, assignments, and other resources. The document also includes details and questions for Assignment 1, which involves problems related to MATLAB programming and numerical computation concepts like obtaining minimum values, vector summation, matrix operations, and plotting decay data.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
275 views

Matlab Programming For Numerical Computation - Unit 3 - Module 1 - Introduction To MATLAB

This document discusses an online MATLAB course offered through NPTEL. It provides information on the course outline, modules, lectures, tutorials, assignments, and other resources. The document also includes details and questions for Assignment 1, which involves problems related to MATLAB programming and numerical computation concepts like obtaining minimum values, vector summation, matrix operations, and plotting decay data.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

1/22/2021 Matlab Programming for Numerical Computation - - Unit 3 - Module 1: Introduction to MATLAB

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

arunachalam725@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Matlab Programming for Numerical Computation (course)

Announcements (announcements) About the Course (preview) Ask a Question (forum)

Progress (student/home) Mentor (student/mentor)

Unit 3 - Module 1: Introduction to MATLAB

Course outline

How does an
Assignment 1
NPTEL online The due date for submitting this assignment has passed. Due on 2020-02-12, 23:59 IST.
course work? As per our records you have not submitted this assignment.

Get Access to
MATLAB Online
Problem 1: Obtaining the Minimum Value
For x in the range x = [0:0.07:5];
Module 1: calculate f (x) 2
= x e
−x
. Report the value of x at which f (x) is minimum
Introduction to
1) Please report the value of x at the minima
MATLAB

Lecture 1.1:
Basics of No, the answer is incorrect.
Programming Score: 0
using MATLAB Accepted Answers:
(unit? (Type: Range) 2.025,2.035
unit=1&lesson=2) (Type: Numeric) 0
Lec 1.2: Array 0.5 points
Operations in
MATLAB (unit? 2) Please report the minimum value f(x) obtained at the minima
unit=1&lesson=3)

Lec 1.3: Loops


and Execution No, the answer is incorrect.
Control (unit? Score: 0
unit=1&lesson=4) Accepted Answers:
(Type: Range) 0.53,0.55
(Type: Numeric) 0

https://onlinecourses.nptel.ac.in/noc20_ge05/unit?unit=1&assessment=87 1/5
1/22/2021 Matlab Programming for Numerical Computation - - Unit 3 - Module 1: Introduction to MATLAB

Tutorial: Using 0.5 points


Arrays (unit?
unit=1&lesson=5)

Lec 1.4: MATLAB


Files -- Scripts
Problem 2: Vector Summation
and Functions
(unit?
unit=1&lesson=6)
Create a function vectFun , which accepts a vector x as an input and returns the following values as
outputs:
Lec 1.5: Plotting
evenSum = x(2) + x(4) + x(6) + ⋯
and Output (unit?
unit=1&lesson=7) funVal = x(1) + 2x(2) + 3x(3) + 4x(4) ⋯

Quiz : First, calculate evenSum and funVal for the vector:


Assignment 1 x 1 = [7, 1, 4, 8, 7, 9, 6]

(assessment?
name=87)
3) Please report the result evenSum for
Matlab x 1 = [7, 1, 4, 8, 7, 9, 6]
Programming for
Numerical
Computation :
Week 1 No, the answer is incorrect.
Feedback Form Score: 0
(unit? Accepted Answers:
unit=1&lesson=90) (Type: Numeric) 18

Assignment 1 0.25 points


solutions (unit?
unit=1&lesson=99) 4) Please report the result funVal for
x 1 = [7, 1, 4, 8, 7, 9, 6]

Module 2: Errors
and
Approximations No, the answer is incorrect.
Score: 0
Module 3: Accepted Answers:
Numerical (Type: Numeric) 184
Differentiation and
0.25 points
Integration

Next, we will use the following two lines of code to generate another vector x 2 :
Module 4: Linear
rng(25);
Equations
x2=randn(1,8);

Module 5: Solving With this value of x 2 , calculate evenSum and funVal


Nonlinear
Equations 5) Please report the result evenSum for x 2

Module 6:
Regression and No, the answer is incorrect.
Interpolation Score: 0
Accepted Answers:
(Type: Range) -1.355,-1.33
Module 7:
Ordinary 0.25 points
Differential
6) Please report the result funVal for x 2

https://onlinecourses.nptel.ac.in/noc20_ge05/unit?unit=1&assessment=87 2/5
1/22/2021 Matlab Programming for Numerical Computation - - Unit 3 - Module 1: Introduction to MATLAB

Equations (single
variable)
No, the answer is incorrect.
Score: 0
Module 8: ODE-
Accepted Answers:
IVP - Practical
(Type: Range) -4.0,-3.7
Aspects
0.25 points
Final Exam
Pattern and
Download

Text Transcripts
Problem 3: Matrix Problem
Consider a matrix:
Download videos

Books

Please answer the following questions about the matrix

7) Report the value of: sum(A(1:2:end,1))

No, the answer is incorrect.


Score: 0
Accepted Answers:
(Type: Numeric) 0

0.25 points

8) Report the value of: rank(A(1:2,2:4))

No, the answer is incorrect.


Score: 0
Accepted Answers:
(Type: Numeric) 2

0.25 points

9) We wish to extract the vector, indicated by the blue box, from the above matrix. Please write the code
below. The expected result from your code is the vector:
b = [ 1 3 −2 1 ].

Please fill in the blank: b = A(2, ________);

(Note: Please ensure that you do not use spaces in the answer)

No, the answer is incorrect.


Score: 0

A dA

https://onlinecourses.nptel.ac.in/noc20_ge05/unit?unit=1&assessment=87 3/5
1/22/2021 Matlab Programming for Numerical Computation - - Unit 3 - Module 1: Introduction to MATLAB

Accepted Answers:
String containing any of these (OR): /(.*)(?:\b2:5\b|\b2:end\b)(.*)/i
String containing any of these (OR): /(.*)(?:\b2:1:5\b|\b2:1:end\b)(.*)/i

0.25 points

10)We wish to extract the sub-matrix indicated by the red box, from the above matrix.
Please fill in the blank for the code below: B = A(3:4, ________);

No, the answer is incorrect.


Score: 0
Accepted Answers:
String containing any of these (OR): /(.*)(?:\b1:2\b|\b1 :2\b|\b1 : 2\b)(.*)/i

0.25 points

Problem 4: Plotting the data


Define vector t=[0:0.5:4]; where t is in number of years. A radioactive element decays in a first-order
process, given by: N (t) = N0 e
−(t/τ)
. Consider N0 = 5 and τ = 0.9 . The data is stored in variables t
and N .
What command will you use in MATLAB to plot the data as solid black line with red diamond as markers
(see the figure below)

11)Choose all the valid commands that will give you the above figure in MATLAB 1 point

plot(t,N,'-krd');

https://onlinecourses.nptel.ac.in/noc20_ge05/unit?unit=1&assessment=87 4/5
1/22/2021 Matlab Programming for Numerical Computation - - Unit 3 - Module 1: Introduction to MATLAB

plot(t,N,'-kd');
plot(t,N,'-rd');
plot(t,N,'-k',t,N,'rd');
plot(t,N,'-kd','MarkerEdgeColor','r')
plot(t,N,'-kd','Color','r');
No, the answer is incorrect.
Score: 0
Accepted Answers:
plot(t,N,'-k',t,N,'rd');
plot(t,N,'-kd','MarkerEdgeColor','r')

https://onlinecourses.nptel.ac.in/noc20_ge05/unit?unit=1&assessment=87 5/5

You might also like