Simulink - sum of elements in exact time

1 visualización (últimos 30 días)
Zsolt
Zsolt el 20 de Abr. de 2013
How to sum elements getting in exact time.
For example the simulation time is 60s and i measure the current and then write to file at every 1s (sample time 1).
*(s)(A)*
  • 1 10
  • 2 10
  • 3 15
  • . .
  • . .
  • 60 15
and my question is how to sum these Ampers and get one result. 10+10+15+..+15 = xxx

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 20 de Abr. de 2013
Use a discrete transfer function bloc set to:
Numerator=1
Denominator=[1 -1]
sample time=1
  2 comentarios
Zsolt
Zsolt el 20 de Abr. de 2013
Helped me a lot, you made my day :) thank you!
Zsolt
Zsolt el 24 de Mayo de 2013
Editada: Zsolt el 24 de Mayo de 2013
I would like to ask you how it works. for example i have these inputs "1 2 3" and the formula look like this 1/z-1 and how it calculate the sum? What is "z" in this case? i have tried calculate it and i became with this "solution"
i think the z - transform formula in this case look like this:
1*1^(-1)+2*1^(-2)+3*1^(-3)=6
thank you

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Modeling 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!

Translated by