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.)

 채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 9월 29일
편집: KALYAN ACHARJYA 2019년 9월 29일

0 개 추천

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

Deokgi Hong
Deokgi Hong 2019년 9월 29일
Thank you!
but I wonder why 't' started from 0.01?
t=0:0.1:10;

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2019년 9월 29일

댓글:

2019년 9월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by