How I summation graph ? I have photo exemple in this post.

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 20 de Jun. de 2015
Editada: Azzi Abdelmalek el 20 de Jun. de 2015
t=0:0.1:10
y1=10*sign(t-5)
y2=20*sign(t-5)
y=y1+y2
plot(t,y1,'r',t,y2,'g',t,y,'b')
If your signal is periodic
t=-20:0.01:20
y1=10*sign(abs(mod(t,10))-5)
y2=20*sign(abs(mod(t,10))-5)
y=y1+y2
plot(t,y1,'r',t,y2,'g',t,y,'b')

5 comentarios

Fieldza Field
Fieldza Field el 20 de Jun. de 2015
Editada: Fieldza Field el 20 de Jun. de 2015
I don't understand.Can you explain me. Thank you.
Azzi Abdelmalek
Azzi Abdelmalek el 20 de Jun. de 2015
Editada: Azzi Abdelmalek el 20 de Jun. de 2015
for y1, If t-5 is negative the output will be 10 multiplied by -1, given by sign(t-5). If t-5 is positive ...
Now, based on this, if you want to do it with a for loop, try it.

Thank you very much.I tried it.It's ok.But i have question.If graph is not equal.How I should summation graph. Can summation? Thank you.

If it's another case, you have to figure it out. Just try to think a little.
Thank you very much.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Objects en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 20 de Jun. de 2015

Comentada:

el 20 de Jun. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by