how can i get a square wave in matlab ?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Chad Gray
el 22 de Feb. de 2016
Comentada: Chad Gray
el 22 de Feb. de 2016
I want to plot a periodic square wave in matlab and the period T has to be 3. How can i plot a sqaure wave the repeats itself every (T=3) ? help please and thank you!
0 comentarios
Respuesta aceptada
Jos (10584)
el 22 de Feb. de 2016
Something like this?
t = linspace(0,20,1000) ;
T = 3 ;
x = sign(sin(2*pi*(1/T)*t)) ;
plot(t,x,'b-')
Más respuestas (0)
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!