Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- syms s
- Gs=80/(s^2*(1000*s+40));
- x=logspace(-2,2);
- xv=x';
- GsF=vpa(subs(Gs,s,x*1i),3);
- GsFAbs=abs(GsF);
- GsFMag=20*log10(GsFAbs);
- figure(1);
- subplot(2,1,1);
- semilogx(x,GsFMag);xlabel('Frequency(rad/sec)');ylabel('Magnitude(dB)');title("Frequency response for "+string(Gs))
- set(gca,'XLim',[0 max(x)]);
- subplot(2,1,2);
- GsFPh=angle(GsF)*180/pi;
- semilogx(x,GsFPh);xlabel('Frequency(rad/sec)');ylabel('Phase(deg)');
- set(gca,'XLim',[0 max(x)]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement