# How to make bode plot of transfer function?

Hello, i am trying to make a bode plot of the transfer function of a twin-t notch filter, that i am analyzing. I was able to produce the transfer function, and the bode plot by hand, but i am struggling to do it in Matlab, here is what i have so far:

`r=320; %Resistancec=100*10^-9; %Capactiancep=(1/(r.*c)); %Betaa=0.95; %Signma, adjusts the wiper of a potentiometerf=(5000); %Target Frequencys= (1i*f);h=((s^2 + p^2) ./ (s^2+4*p*s*(1-a)+p^2)); %Transfer functionmh=abs(h); %Magitude of hah=angle(h); %Phase angle of h, in rads.`

I am trying to plot the body function, and here is one i made for the transfer function H=2/(s+1):

`% Example Transfer Function: g(s) = 2/(s+1)`

% Numerator num = [2]; % Denominator den = [1 1];

% Transfer Function G = tf(num, den)

% Plot Frequency Response bode(G), grid

My question is, how would i represent the numerator and the denominator, since they are both powers of of s, which from my understanding the computer understands as s=jw, and thus i solved the transfer function as such. I have tried to understand how exactly the bode function takes it inputs, but i am not understanding that…

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

`num = [1  0  p^2];den = [1  4*p*(1-a)  p^2];`

I’m certain you can take it from there.

Also, remember that the bode function can output the results of its computations, and the bodeplot function allows you to tweak its behaviour.

--

--

## More from Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

Love podcasts or audiobooks? Learn on the go with our new app.

## Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.