How can i obtain a signal like this? i have some problem with the code.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Respuesta aceptada
Jos (10584)
el 20 de Oct. de 2017
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'})
Más respuestas (1)
Birdman
el 20 de Oct. de 2017
Editada: Birdman
el 20 de Oct. de 2017
Try this model. The sine wave is automatically plotted when you run and close the model.
3 comentarios
Jos (10584)
el 20 de Oct. de 2017
Is it indeed a sine-wave between T/2 and 2*(T/2)? (Your curve suggests an ellipse-like curve)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!