Simulink - sum of elements in exact time

조회 수: 1 (최근 30일)
Zsolt
Zsolt 2013년 4월 20일
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

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 4월 20일
Use a discrete transfer function bloc set to:
Numerator=1
Denominator=[1 -1]
sample time=1
  댓글 수: 2
Zsolt
Zsolt 2013년 4월 20일
Helped me a lot, you made my day :) thank you!
Zsolt
Zsolt 2013년 5월 24일
편집: Zsolt 2013년 5월 24일
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by