Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 3 ( 3 points ) The following Python code plots i = 1 e s 1 2 on the interval 0 < = s

Question 3(3 points)
The following Python code plots i =1 e
s1
2 on the interval 0<= s <=1. It
plots a red dashed line, adds a label in a legend, and uses half of the figure (one
subplot out of two).
import numpy as np
import matplotlib.pyplot as plt
s = np.linspace(0,1,2**7)
i =1- np.exp(s -0.5)
plt.subplot(1,2,1)
plt.plot(s, i,"r--", label="i")
plt.legend()
plt.xlabel(s)
plt.show()
a) On the same subplot, plot j = s
2
1
4
and k =
1
s+1. Make sure all values
are labeled and easily distinguishable from one another.
b) The given values of i(s), j(s), k(s) are Cartesian coordiates of an object
as a function of s. On the same subplot, plot also the radial distance of the
object from the k axis and the radius of the object from the origin.
c) On a second subplot, plot the azimuth (from the i axis) and the elevation
(from the k axis) of the object. Make sure all values are labeled and easily
distinguishable from one another.
Hint: read about np.arctan2 and np.arccos functions.

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

explain how organizations can promote a positive safety climate.

Answered: 1 week ago

Question

Describe five career management practices

Answered: 1 week ago