I have this:
d(:,:,i) = 0.005*sin(0.5*pi*t(i))*cos(0.5*pi*t(i))
i=1:Nt
t = linspace(0,100,Nt+1)
Nt=1000
How do I plot d using Matlab?

 채택된 답변

Mischa Kim
Mischa Kim 2014년 2월 12일
편집: Mischa Kim 2014년 2월 12일

0 개 추천

Use
Nt = 1000
t = linspace(0,100,Nt+1)
d = 0.005*sin(0.5*pi*t).*cos(0.5*pi*t)
plot(t,d)
Any reason you are using a 3-dimensional array d ?

댓글 수: 1

dab483
dab483 2014년 2월 12일
yeah..i missing dot there. Got that. Thanks
i am running an EKF with d as disturbances.

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

추가 답변 (1개)

Wayne King
Wayne King 2014년 2월 12일

0 개 추천

Not sure why you are trying to construct your signal like this. Take advantage of MATLAB's vector operations.
Nt = 100;
t = linspace(0,100,Nt);
d = 0.005*sin(0.5*pi*t)+cos(0.5*pi*t);
plot(t,d)

카테고리

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

태그

질문:

2014년 2월 12일

댓글:

2014년 2월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by