How can i obtain a signal like this? i have some problem with the code.
조회 수: 1 (최근 30일)
이전 댓글 표시
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/168481/image.png)
댓글 수: 0
채택된 답변
Jos (10584)
2017년 10월 20일
T = 1 ;
n = 5/2 ;
t = linspace(0,n*T,1000) ;
x = sin(2*pi*t/T + pi) ;
q = t < T/2 | t > T ;
x(q) = 0 ;
plot(t,x,'b.-')
set(gca,'xtick',[0 .5 1 n],'xticklabel',{'0','T/2','T','5T/2'})
추가 답변 (1개)
Birdman
2017년 10월 20일
편집: Birdman
2017년 10월 20일
Try this model. The sine wave is automatically plotted when you run and close the model.
댓글 수: 3
Jos (10584)
2017년 10월 20일
Is it indeed a sine-wave between T/2 and 2*(T/2)? (Your curve suggests an ellipse-like curve)
참고 항목
카테고리
Help Center 및 File Exchange에서 Curve Fitting Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!