Borrar filtros
Borrar filtros

help create a positive sin wave

10 visualizaciones (últimos 30 días)
Viswajit Talluru
Viswajit Talluru el 5 de Oct. de 2022
Comentada: Star Strider el 6 de Oct. de 2022
Hey! need help creating a positive sin wave
  2 comentarios
Jan
Jan el 5 de Oct. de 2022
What exactly do you call a "positive sine wave"?
John D'Errico
John D'Errico el 6 de Oct. de 2022
A positive sine wave is one who always thinks of the glass as being half full. Of course. ;-)
My guess is Star has the answer, by translating the curve up by a constant. Only a guess though.

Iniciar sesión para comentar.

Respuestas (2)

Star Strider
Star Strider el 5 de Oct. de 2022
Perhaps —
syms t
positive_sine = sin(2*pi*t) + 1
positive_sine = 
figure
fplot(positive_sine, [0 5])
grid
ylim([-1 3])
hold on
yline(0,':k', 'LineWidth',1.5)
hold off
  2 comentarios
Viswajit Talluru
Viswajit Talluru el 6 de Oct. de 2022
thank you for the help.
Star Strider
Star Strider el 6 de Oct. de 2022
My pleasure!

Iniciar sesión para comentar.


Sam Chak
Sam Chak el 6 de Oct. de 2022
Sounds intriguing. Are you looking for the half-wave rectified sine wave?
x = -2:0.01:2;
y1 = sin(pi*x); % full sine wave
y2 = sin(pi*x).*heaviside(sin(pi*x)); % half-wave rectified sine wave
plot(x, y1, '--'), hold on,
plot(x, y2, 'linewidth', 1.5), grid on, ylim([-1.5 1.5])

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by