문제

I'm trying to add two transfer functions together, for example:

tf1=tf(1,[1 0]);  
tf2=tf(2,[1 0]);  
tsum=tf1+tf2

MATLAB considers tf1 and tf2 as blocks connected in series and therefore multiplies tf1 and tf2 together, the result is:

tsum =

3 s
---
s^2

Continuous-time transfer function.

how can I get MATLAB to return the sum of tf1 and tf2 ? so the transfer function that i'm looking for is:

3
-
s
도움이 되었습니까?

해결책

EDU>> minreal(tsum)

ans =

  3
  -
  s

Continuous-time transfer function.

see

http://www.mathworks.com/help/control/ref/minreal.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top