Generating Triangular wave in simulink
110 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
kash
el 7 de Oct. de 2012
Respondida: Vijay P
el 3 de Mayo de 2018
I have sine wave bx is simulink,is there any box for triangular wave available,else please tell how to generate triangular wave in simulink of equal amplitude and time
1 comentario
Walter Roberson
el 9 de Oct. de 2012
Please read the guide to tags and retag this question; see http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags
Respuesta aceptada
Azzi Abdelmalek
el 8 de Oct. de 2012
generate your signal in matlab command then use a from workspace block with variable name ty
ts=0.1;
t=-3:ts:3
y=repmat(max(t)-abs(t),1,10)
t=-3:ts:-3+length(y)*ts-ts
ty=[t' y']
6 comentarios
JohnLio
el 6 de Dic. de 2013
Azzi Abdelmalek: i didn't get how you did that, can you please elaborate a bit how to and which block i have to use in matlab, and where to put these code, newbie in matlab :|
Más respuestas (3)
Julien
el 7 de Oct. de 2012
Editada: Julien
el 7 de Oct. de 2012
Hi, the triangle generator does not exist but you can create your own.
My tip is to create a pulse signal (pulse width =50%) and adding a negative offset (typically the half of the amplitude you want).
If you want a triangle signal between [0 1] then you have to set:
pulse amplitude : 4 offset : -2
Then you have a pulse varying between [-2 2] You just have to integrate this signal and you will get a nice triangle signal varying between [0 1] ;)
4 comentarios
Julien
el 8 de Oct. de 2012
My example simulink block is online
10 comentarios
Azzi Abdelmalek
el 9 de Oct. de 2012
If you have another problem, I suggest to post another question
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!