Asymetric Amplitude

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 comentario

bym
bym el 29 de Jun. de 2011
what have your tried so far?

Iniciar sesión para comentar.

Respuestas (2)

Paulo Silva
Paulo Silva el 29 de Jun. de 2011

0 votos

t=0:0.01:10;
f=sin(t);
f(f<0)=f(f<0)/2;
plot(t,f)
Walter Roberson
Walter Roberson el 29 de Jun. de 2011

0 votos

PosAmp = 1.0;
NegAmp = 0.5;
sinus = PosAmp .* linspace(0,50*pi,500);
sinus(sinus<0) = sinus(sinus<0) .* (NegAmp ./ PosAmp);

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 29 de Jun. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by