title: MATLAB Common denominator
body: <p>I have this MATLAB function which receives the following input:</p>
  
  <pre><code>A=[0 1; 0 -1];
  B=[0; 1]
  C=[-1 1];
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code>function [ T ] = transferMAtrix( A, B, C )
      s=sym('s');
      [n n] = size(A);
      sI=s*sym(eye(n));
      T=sym(C)*inv(sI-sym(A))*sym(B);
  
  end
  </code></pre>
  
  <p>And transferMAtrix(A, B, C) returns the following output:</p>
  
  <pre><code>1/(s + 1) - 1/(s*(s + 1))
  </code></pre>
  
  <p>My questions is: is there a method to make those fractions have the same denominator so that the output would be:</p>
  
  <pre><code>(s-1)/(s*(s+1))
  </code></pre>
  
  <p>?</p>