Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In MATLAB, take the sine wave given to you named y and compute its (estimated) first derivative using a for loop. Save the result to

image text in transcribed

In MATLAB, take the sine wave given to you named y and compute its (estimated) first derivative using a for loop. Save the result to a variable named y_prime. After computing y_prime, normalize it so that the maximum value is 1 and the minimum is 1. As a reminder, you can approximate the first derivative by subtracting sample i from sample i+1. This means that y_prime will be 1 sample shorter than y. Note: I recognize there are faster, more efficient, etc. ways to compute the first derivative. The goal is to force practicing a for loop. It's highly encouraged to check your answer against one of these other methods. Feel free to leave the code you used for the check in the assignment you turn in Copy and paste your code as the answer to this question on Gradescope \( \begin{array}{ll}\% \text { Don't delete this! } & \\ \text { fs }=1000.0 ; & \% \text { Hz; sampling rate } \\ \text { n_time }=1 ; & \% \text { Seconds; length of signal } \\ \text { time }=\text { linspace }\left(0, n_{-} t i m e, n_{-} t i m e * f s ight) ; & \% \text { List of seconds; time points of our data } \\ \mathrm{f}=10.0 ; & \% \text { Hz; frequency of sine wave } \\ \mathrm{a}=1.0 ; & \% \text { Amplitude of sine wave (arbitrary unit) } \\ \mathrm{y}=\mathrm{a} * \sin (\mathrm{pi} * 2 * \mathrm{f} * \text { time); } & \% \text { Create our sine wave } \\ \% \text { Problem } 3 \text { answer here } & \end{array} \)

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

int mainO char letter'a; while cout > letter; cout

Answered: 1 week ago

Question

10. What is meant by a feed rate?

Answered: 1 week ago