sinewave generation:how generatea sine wave
9 views (last 30 days)
Show older comments
Folarin Ojetoro
on 12 Nov 2016
Answered: MD Rasel Basunia
on 8 Apr 2022
i want to know how to generate a sine wave
0 Comments
Accepted Answer
Daniel kiracofe
on 13 Nov 2016
t=0:0.001:1; freq = 10; signal = sin( freq * 2 * pi * t); plot(t, signal);
0 Comments
More Answers (1)
MD Rasel Basunia
on 8 Apr 2022
% sinusoidal wave,x(t)=A*sin(2*pi*f*t); % set signal frequency f=10; %sampling frequency with oversampling %factor 50 fs=50*f; % sampling interval or period Ts=1/fs; %suppose you want to plot 6 cycle of sin %wave Number_of_cycle=6;
% time range for sin wave t=0:Ts:Number_of_cycle/f-Ts; % define sinusoidal %Amplitude A=2; x=A*sin(2*pi*f*t); plot(t,x,'k','linewidth', 2);grid on; xlabel('time');ylabel('Amplitude '); legend('sine wave');
0 Comments
See Also
Categories
Find more on Measurements and Feature Extraction in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!