Answered step by step
Verified Expert Solution
Question
1 Approved Answer
f=10; %frequency of sine wave overSampRate=20; %oversampling rate fs=overSampRate*f; %sampling frequency phase = 1/3*pi; %desired phase shift in radian nCyl = 8; %to generate five
f=10; %frequency of sine wave overSampRate=20; %oversampling rate fs=overSampRate*f; %sampling frequency phase = 1/3*pi; %desired phase shift in radian nCyl = 8; %to generate five cycles of sine wave t=0:1/fs:nCyl*1/f-1/fs; %time base g=sin(2*pi*f*t+phase); %replace with cos if a cosine wave is desired plot(t,g); title(['Sine Wave f=', num2str(f), 'Hz']); Using MATLAB answer the following questions and show the graphs. 1)What changes do you need to make for doubling the amplitude of the signal? 2)What changes do you need to make so that the sinusoidal signal starts at (0, 0) or (0, 1)?
f=10; %frequency of sine wave
overSampRate=20; %oversampling rate
fs=overSampRate*f; %sampling frequency
phase = 1/3*pi; %desired phase shift in radian
nCyl = 8; %to generate five cycles of sine wave
t=0:1/fs:nCyl*1/f-1/fs; %time base
g=sin(2*pi*f*t+phase); %replace with cos if a cosine wave is desired
plot(t,g); title(['Sine Wave f=', num2str(f), 'Hz']);
Using MATLAB answer the following questions and show the graphs.
1)What changes do you need to make for doubling the amplitude of the signal?
2)What changes do you need to make so that the sinusoidal signal starts at (0, 0) or (0, 1)?
Step 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