Sine wave changing amplitude

43 ビュー (過去 30 日間)
Nuchto
Nuchto 2014 年 11 月 6 日
コメント済み: chirag hb 2018 年 1 月 22 日
Can you have a sine wave with varying amplitudes? I think this concept does not exist.

回答 (3 件)

Image Analyst
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.
  2 件のコメント
Tahariet Sharon
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
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
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 件のコメント
chirag hb
chirag hb 2018 年 1 月 22 日
Can u tell when me how to do in simulink

サインインしてコメントする。


Youssef  Khmou
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');
  4 件のコメント
Image Analyst
Image Analyst 2014 年 11 月 7 日
But sometimes the imaginary part is zero. Here is the table:
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
Youssef  Khmou
Youssef Khmou 2014 年 11 月 7 日
Ok

サインインしてコメントする。

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by