Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Define a function, plot _ temperature _ histogram ( Ts , bins, range ) , which produces a histogram ( as a matplotlib figure )

Define a function, plot_temperature_histogram(Ts, bins, range), which produces a histogram (as a matplotlib figure) showing the temperatures encountered at the end of the random walks grouped into counts based on bins of temperature ranges. The parameter Ts is a numpy array of temperatures from all individual walks; it is part of the output from a call to wos_temperature_estimate. The
parameter bins is an integer which indicates how many bins are used in the histogram, and range is a tuple with two floats of form (T_min, T_max) where Tmin is the lower temperature bound for the histogram and Tmax is the upper bound. As a hint, take a look at the matplotlib documentation for producing histograms.
sample
>>> x =0.6; y =0.3
>>> length =1.0; epsilon =0.01
>>> cnr_temps ={'sw':600.0,'se':700.0,'ne':1000.0,'nw':850.0}
>>> number_walks =100
>>> random.seed(1)
>>>(T_avg, Ts)= wos_temperature_estimate(x, y, length, cnr_temps, epsilon,
,-> number_walks)
>>> plot_temperature_histogram(Ts,8,(600.0,1000.0))
image text in transcribed

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

Step: 3

blur-text-image

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

2. What are the components of IT infrastructure?

Answered: 1 week ago