How do I express this function in MATLAB?
when T = 3s, W = Pi rad/s, t has a value, from 0 to 10 seconds.
y(t) = 10 * e^(-t / T) * sin(W * t)
(T is time constant. and W is angular velocity.)

 Respuesta aceptada

KALYAN ACHARJYA
KALYAN ACHARJYA el 29 de Sept. de 2019
Editada: KALYAN ACHARJYA el 29 de Sept. de 2019

0 votos

function y=test1()
T=3;
W=pi;
t=0.01:10
y=10*exp((-t./T).*sin(W.*t))
end
Or Direct
T=3;
W=pi;
t=0.01:10;
y=10*exp((-t./T).*sin(W.*t))

2 comentarios

Deokgi Hong
Deokgi Hong el 29 de Sept. de 2019
Thank you!
but I wonder why 't' started from 0.01?
t=0:0.1:10;

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Preguntada:

el 29 de Sept. de 2019

Comentada:

el 29 de Sept. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by