![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/176527/image.jpeg)
Sine wave changing amplitude
조회 수: 27 (최근 30일)
이전 댓글 표시
Can you have a sine wave with varying amplitudes? I think this concept does not exist.
댓글 수: 0
답변 (3개)
Image Analyst
2014년 11월 6일
See attached demo (make_wav_file.m, below the plot) where I vary the amplitude and frequency of a sound wave.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/176527/image.jpeg)
댓글 수: 2
Tahariet Sharon
2017년 10월 27일
편집: Tahariet Sharon
2017년 10월 27일
Yes, but the initial qustion was about changing the amplitude of a SINE wave, not a complex wave.
Image Analyst
2017년 10월 27일
My demo DOES modify the amplitude of a sine wave. Perhaps you overlooked this line of code in it:
% Construct the waveform:
y = int16(Amplitude .* sin(2.*pi.*t./T));
The amplitude array is changing according to 2 ways in my demo: an exponential decay and another lower frequency since wave, but you could alter the amplitude in whatever way you want. So I'm not sure why the "but" is in your comment.
Orion
2014년 11월 6일
편집: Orion
2014년 11월 6일
Sure you can.
a sine wave is defined by
y = A*sin(w*t+phi).
if you define A as a function(vector) dependant of the time, then you get a sine wave with varying amplitudes.
t = 0:0.01:10;
w = 8*pi;
phi = 0;
A = floor(t); % why not
y = A.*sin(w*t+phi);
plot(t,y);
I did it in matlab, but you can obviously do it with simulink (don't know what tool you're using).
댓글 수: 1
Youssef Khmou
2014년 11월 6일
Nuchto, That is the amplitude modulation, it is possible to simulate that type of signals:
x=real(exp(j*2*pi*(0:0.1:10)));
y=rand(size(x)).*x;
subplot(1,2,1), plot(x);
subplot(1,2,2); plot(y): title(' random amplitude');
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/176525/image.bmp)
댓글 수: 4
Image Analyst
2014년 11월 7일
Time Domain Frequency Domain
real hermitian (real=even, imag=odd)
imaginary anti-hermitian (real=odd, imag=even)
even even
odd odd
real and even real and even (i.e. cosine transform)
real and odd imaginary and odd (i.e. sine transform)
imaginary and even imaginary and even
imaginary and odd real and odd
참고 항목
카테고리
Help Center 및 File Exchange에서 Measurements and Spatial Audio에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!