Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The aim of this practical is to introduce use the 3rd party Python packages matplotlib, numpy and sympy to make plots and solve simple problems.

image text in transcribed
The aim of this practical is to introduce use the 3rd party Python packages matplotlib, numpy and sympy to make plots and solve simple problems. Include all code and plots in your submission. Question 1. [10] Question 1.1. Use matplotlib to make a scatter plot of the (x, y)-points in the provided dataset dataset0. txt. (You do not need to write out the dataset in your submission). Question 1.2. Define po := 0, p1 := 1 and pn := 2pn-1 + Pn-2 for n = 2, 3.... Use a list comprehension to generate the dataset {(n, Pn) : n = 0, 1, 2, ..., 20 }. Use matplotlib to make a scatter plot of the (x, y)-points in this dataset. Question 1.3. Use numpy and matplotlib to make line plots of the functions f and g as defined below on the same set of axes. . f : [-20, 10] - R is defined as f(x) := x sin(x - 5) for x E [-20, 10]. . g : [-20, 10] - R is defined as g(x) := arctan(x) for x E [-20, 10]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions