Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the following code modify 3 parameters to make calculated slope equal 0 . 6 7 . Do not modify inherent values of B ,

In the following code modify 3 parameters to make calculated slope equal 0.67. Do not modify inherent values of B, instead change other values such as array length as appropriate to make slope equal 0.67. Modify only and exactly 3 values.from numpy import zeros, linspace
import matplotlib.pyplot as plt
from scipy import stats
N_t =6
B =[0.022,0.036,0.06,0.101,0.169,0.266]
dB = zeros(N_t -1)
t = linspace(0, N_t-1, N_t)
for i in range(0, N_t-1):
dB[i]= B[i+1]- B[i]
print("B =", B,"
","dB =", dB)
copy_dB = dB[:(N_t -1)]
copy_B = B[:(N_t -1)]
copy_t = t[:(N_t -1)]
slope, intercept, r_value, p_value, std_err = stats.linregress (copy_B, copy_dB)
print('slope =','%.3f'% slope, 'intercept =','%.4f'% intercept)
plt.figure(1)
plt.plot(copy_t, copy_dB,'bo')
plt.xlabel('t'); plt.ylabel('dB')
plt.figure(2)
plt.plot(copy_B, copy_dB,'bo')
plt.xlabel('B'); plt.ylabel('dB')
plt.figure(3)
plt.plot(t, B,'bo', t, B[0]*(1+slope)**t)
plt.legend(['data', 'equation'], loc = 'upper left')
plt.xlabel('t'); plt.ylabel('dB')

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

Guide To Client Server Databases

Authors: Joe Salemi

2nd Edition

1562763105, 978-1562763107

More Books

Students also viewed these Databases questions