Question

1. Write a function to find the indices of a time series in which the absolute...

1. Write a function to find the indices of a time series in which the absolute value of the derivative is above a particular threshold. This is somewhat based on work we’ve done in this chapter. The function:
(a) should be named where_deriv_large.
(b) should take two arguments: times, data (in that order).
(d) should return a tuple. The first element is the indices of the derivative that exceed a particular threshold. The second element is the count of the number of values of the derivative exceed the threshold The third element is the (signed) derivative values for the entire time series.

Let’s set the threshold to nominally be 5000. So, your function will find where the absolute value of the derivative of a time series is larger than 5000.


in python please

Homework Answers

Answer #1

Solution For The Above Problem

#Pseudo-code in Python3:

#importing the required libraries

#declare a function with 2 args times and data

def where_deriv_large(t,d):

def f(x):

return abs(x)

dx = f(x).diff(x)

dx
(re(x)*Derivative(re(x), x) + im(x)*Derivative(im(x), x))/Abs(x) #calculate the derivative

thr=0

tuple=()

if thr>5000:

tuple[0]= #indices of element that satistfy above condition

tuple[1]=#count values that satisfy above condition

tuple[2]=#derivative values (dx)

return tuple()

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT