sinewave generation:how generatea sine wave

9 ビュー (過去 30 日間)
Folarin Ojetoro
Folarin Ojetoro 2016 年 11 月 12 日
回答済み: MD Rasel Basunia 2022 年 4 月 8 日
i want to know how to generate a sine wave

採用された回答

Daniel kiracofe
Daniel kiracofe 2016 年 11 月 13 日
t=0:0.001:1; freq = 10; signal = sin( freq * 2 * pi * t); plot(t, signal);

その他の回答 (1 件)

MD Rasel Basunia
MD Rasel Basunia 2022 年 4 月 8 日
% 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');

カテゴリ

Help Center および File ExchangeMeasurements and Feature Extraction についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by