 function[mag,phase]=bode_transfer_function(n1,n2,n3,d1,d2,d3,omega);
 %
 clear num;
 clear den
 clear s;
 clear trans;
 clear treal;
 clear timag;
 %
 s=i*omega;
 num = n1*s.*s + n2*s + n3;
 den = d1*s.*s + d2*s + d3;
 %
 n=length(omega);
 for(jk=1:n)
    trans=num(jk)/den(jk);
    treal=real(trans);
    timag=imag(trans);
    mag(jk) = sqrt(treal^2+timag^2);
    phase(jk) = atan2(timag,treal);
 end
 phase=phase*180/pi;