MATLAB How to set frequency in matlab

Question?
for a short-circuit transmission line of l=10cm. determine the the expression to calculate the magnitude of the input impedance. Use matlab to draw magnitude plot when the frequency is swept away from f=1GHz to 3GHz. the line parameters are: L=209.4nH/m and C=119.5pF/m.

My matlab coding for this solution:

L=209.410e-9;
c=119.510e-12;
vp=1/sqrt(L*C);
Z0=sqrt(L/C);
l=0.1;
N=5000;
f=1e9+3e9*(0:N)/N;
Z=tan(2*pi*f*d/vp);
axis([1 3 0 500])

i am not sure whether i have set the frequency in the coding correctly, can anyone pls chk this for me thanks.....
 

Want to reply to this thread?

"How to set frequency in matlab" You must log in or register to reply here.

Related Threads for: How to set frequency in matlab

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top