Generates a sawtooth wave with amplitude of 1 unit, a frequency of 2 Hz or (4pi radians per second) and a phase shift of pi/4 radian.
조회 수: 7 (최근 30일)
이전 댓글 표시
Generates a sawtooth wave with amplitude of 1 unit, a frequency of 2 Hz or (4pi radians per second) and a phase shift of pi/4 radian.
댓글 수: 0
채택된 답변
Yazan
2021년 7월 1일
% amplitude
amp = 1;
% fundamental frequency
f = 2;
% time span of 10 periods
T = 10/f;
% phase shift
theta = pi/4;
% sampling frequency (for example 20*f)
fs = 20*2;
% time intsants
t = 0:1/fs:T-1/fs;
% generate signal
x = sawtooth(2*pi*f*t+theta);
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Waveform Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!