%% L03_Ltransform %% ============== %% Script to find analyse RC circuit. %% %% Created : 15 July 2005 %% Modified : 15 July 2005 %% %% Copyright (c) 2005 Salman Durrani . %% ------------------------------------------------------------ %% clear matlab memory clear all; clc %% RC components R1 = 9e3; R2 = 1e3; C=0.3193e-6; fc = 1/(2*pi*(R1+R2)*C); %% find transfer function a = R2*C; b = (R1+R2)*C; num =[a 1]; den =[b 1]; H = tf(num,den); %% impulse response figure impulse(H) %% pole-zero plot figure pzmap(num,den) %% step response figure step(H) %% Bode Plot %% generate 100 point freq vector from 1Hz to 1kHz f = logspace(1,3,100); bode(H,f); grid on