Question: Here we want to define a function of and coordinates: = sin cos ( + ) + where = 2 + 2 , and are

Here we want to define a function
of
and
coordinates:
=sincos(+)+
where =2+2
,
and
are constants. We then plot the function with a colour map and make a histogram giving some details about the map. In particular, please do the following:
Introduce a Python function that does the following: (1) defines Numpy arrays x and y from
to
with N elements each; (2) computes the values of the function
as defined above; (3) accepts
,
and
as arguments and
and
as keywords with default values =1,=0
; (4) return arrays
,
and the 2D Numpy array
.
Produce a figure with two panels side by side horisontally. The left hand side panel should show the colour map image and a contour plot (on the same image) of function
for =1
,=1
,=100
,=0
,=2
. The right hand panel should show the histogram of the values of
for all the (\times
) pixels. Make sure that you plot looks professional, e.g., has labels and the title. Test that your code works for
between 0 and 2.
Compute and print in one line the mean of the function (,)
on the domain defined above. Use .format statement and the scientific notation with 4 digits after the floating point.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!