Asymetric Amplitude

3 次查看(过去 30 天)
Filipe
Filipe 2011-6-29
Hi people,
I want to generate a sinusoid with asymmetric amplitude. The positive amplitude must be 1 and the negative amplitude must be 0.5.
How can I do It?
thanks

回答(2 个)

Paulo Silva
Paulo Silva 2011-6-29
t=0:0.01:10;
f=sin(t);
f(f<0)=f(f<0)/2;
plot(t,f)

Walter Roberson
Walter Roberson 2011-6-29
PosAmp = 1.0;
NegAmp = 0.5;
sinus = PosAmp .* linspace(0,50*pi,500);
sinus(sinus<0) = sinus(sinus<0) .* (NegAmp ./ PosAmp);

类别

Help CenterFile Exchange 中查找有关 Animation 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by