Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB: Please, I need help with this: f-1; % frequency in Hertz (cycles/second) % amplitude A-1; s theta-pi/2 4 offset-0; s duration-10; e sampleRate-1000; 7
MATLAB:
Please, I need help with this:
f-1; % frequency in Hertz (cycles/second) % amplitude A-1; s theta-pi/2 4 offset-0; s duration-10; e sampleRate-1000; 7 maxSamp-duration sampleRate; s t-(1:maxSamp)/sampleRate; phase in radians % DC offset % duration of signal in seconds rate of time samples (samples/second) % total number of time samples for duration % time sample vector 10 % generate sinusoid 11 y-A+ cos (2*p1+f*t + thetaHoffset ; 12 plot the sinusoid i3 plot (t,y) 14 xlabel 'time (s)' is ylabel('amplitude' Using the parameters provided in the sample code, complete the following exercises. 1. (R1.1) Plot a cosine having (1) half the frequency, (2) double the amplitude, (3) zero phase offset, and 2. (R1.2) Compute the phase in radians that wi result in a phase delay of 0.3/ seconds compared to 3. Create a sine and cosine, each having a frequency of 5 Hz and no phase shift or DC offset. (R1.4) (4) a DC offset of-1 amplitude units. Also plot the original sinusoid on the same figure for reference. the original cosine. (R1.3) Plot the result including the original cosine on the same figure. Compute the amplitude of each sinusoid such that, when added together, the resulting waveform has an amplitude of 3 units and a phase delay of T/1 radians. (R1.5) Adjust the time duration to display 5 full cycles and plot all three signals in the same figure, clearly labeled 4. Write a Matlab script using a for loop that will gencrate a sum of N harmonically-related sinusoids in cosine form, each with a configurable amplitude and phase. 5. Use the script above and the parameters given below to generate a sum of harmonic sinusoids in cosine form. (R1.6) Include the modified script frequency 3 Hz duration 2 seconds 6. (R1.7) Using subplots with 5 rows and 2 columns, in the left-hand column plot each individual sinusoid with n increasing from top to bottom. In the right-column, plot the cumulative sum of the sinusoids with each increasing n from top to bottomStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started