Clear Filters
Clear Filters

Asymetric Amplitude

3 views (last 30 days)
Filipe
Filipe on 29 Jun 2011
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
  1 Comment
bym
bym on 29 Jun 2011
what have your tried so far?

Sign in to comment.

Answers (2)

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

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

Categories

Find more on Animation in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!