4. (a) Generate a cosine waveform with given specifications. N=64; % signal length (power of 2) T = 1; % sampling period

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

4. (a) Generate a cosine waveform with given specifications. N=64; % signal length (power of 2) T = 1; % sampling period

Post by answerhappygod »

4 A Generate A Cosine Waveform With Given Specifications N 64 Signal Length Power Of 2 T 1 Sampling Period 1
4 A Generate A Cosine Waveform With Given Specifications N 64 Signal Length Power Of 2 T 1 Sampling Period 1 (46.48 KiB) Viewed 15 times
4. (a) Generate a cosine waveform with given specifications. N=64; % signal length (power of 2) T = 1; % sampling period is set to 1 A = 1; % sinusoid amplitude f-0.25;%f-1/4 nT [0:N-1]*T; x = cos(2*pi*f*nT); % sinusoid Plot its time and frequency versions. 4. (b) The above example was somewhat contrived. It is more likely that the signals you analyze will have sinusoidal components that don't complete a full cycle or, said differently, have frequency components that lie between frequency bins. Let's see what happens in such a case. First, increase the frequency in the above example by one-half of a bin: f=0.25 +0.5/N; % Move frequency up 1/2 bin x1 = cos(2*pi*f*nT); % Signal to analyze x-[x1 x1]; % Periodic Extension Now plot the time & frequency versions of this new signal. Compare the results of a & b. The best approach to minimize leakage in practical applications is to multiply the time record by a suitable window function before performing FFT. A window function generally has a unit gain at the center of the FFT segment, decreasing gradually to zero or a small value at both ends of the FFT segment, and becomes zero outside the FFT segment. Thus it greatly suppresses the discontinuity of the time record between FFT segments.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply