Question: Exercise 1 : Stencil operations & slicing f ( x ) = ( x 2 + 4 x + 5 x + 2 e x
Exercise : Stencil operations & slicing
Hint: Remember the use of the lambda function.
# YOUR CODE HERE
raise NotImplementedError
b Calculate the derivative of with the central difference formula below save result in the variable fprime
~~
# YOUR CODE HERE
raise NotImplementedError
We add to a scaled noise as follows
# RUN THIS CELL. DO NOT MODIFY.
numpy. random. seed
numpy. random. rand
fprimenoise numpy.gradient
c Next step is to compute smoothed values of the noisy data yn by using the average of a point with its two nearby neighbors.
Use slicing to compute the following, save your result in a variable called ysmooth
# YOUR CODE HERE
raise NotImplementedError
d Using an average of points as follows:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
