Lab Sheet 05 - Exercises PDF
Lab Sheet 05 - Exercises PDF
Lab Sheet 05 - Exercises PDF
General Program Lab 05: Numpy and Matplotlib Nov 09, 2020
Exercise 01
1. Generate vector y whose elements are the values of the function (1) for values of x from -4 to +4, with
increments 0.01.
1
y = x3 + (1)
x2 + 1
Plot a graph for y versus x. Give meaningful labels to x-axis and y-axis of the graph and give a suitable
title to the plot.
Exercise 02
1. Generate vector y whose elements are the values of the function (2) for values of x from -1 to +1, with
increments 0.01.
x
y= (2)
1 + ln x
Plot a graph for y versus x. Give meaningful labels to x-axis and y-axis of the graph and give a suitable
title to the plot.
Exercise 03
1. Generate vector y whose elements are the values of the function (3) for values of x from −2π to 2π, with
increments π/24.
cos(x)
y= (3)
1 + sin(x)
Plot a graph for y versus x. Give meaningful labels to x-axis and y-axis of the graph and give a suitable
title to the plot.
Exercise 04
1. Generate vector y whose elements are the values of the function (4) for values of x from -10 to 10, with
increments 0.01.
r
1
y= (4)
x2 + 1
Plot a graph for y versus x. Give meaningful labels to x-axis and y-axis of the graph and give a suitable
title to the plot.