Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
Use Python to plot the losses and resistances of the 4 coaxial cables listed in slide #12. The losses are presented in dB/m versus the
Use Python to plot the losses and resistances of the 4 coaxial cables listed in slide #12. The losses are presented in dB/m versus the frequency from 100M H z to 10GH from matplotlib.pyplot import plot, figure, legend,xlabel,ylabel,semilogx, show,grid from numpy import sqrt,array,zeros k1-array ([0.6,0.69,2.1,2.7]) k2-array ([0.0016,0.0037,0.0021,0.0015]) cables-['625-F', '500-F', 'RG-6 'RG-59' f1-100 f2-10000 df-100 N-int ((f2-f1)/df) freq-zeros (N) R-zeros( [4,N]) Ac-zeros ([4,N]) # add your codes here fig-figure(1) for i in range(len (cables)): semilogx(freq,R[i],label-cables [i]) grid(True) legend() xlabel('Freq. (MHz)); ylabel(r 'Rsistance($10mega/m$)"); show() fig.savefig( 'HW4-1-1',dpi-300) fig-figure(2) for i in range(len(cables)): plot(freq,Ac[i], label-cables [i]) grid (True) legend() xlabel('Freq. (MHz) ); ylabel (r 'Attenation ($dB/m$)'); show) fig.savefig('Hw4-1-2",dpi-300) Use Python to plot the losses and resistances of the 4 coaxial cables listed in slide #12. The losses are presented in dB/m versus the frequency from 100M H z to 10GH from matplotlib.pyplot import plot, figure, legend,xlabel,ylabel,semilogx, show,grid from numpy import sqrt,array,zeros k1-array ([0.6,0.69,2.1,2.7]) k2-array ([0.0016,0.0037,0.0021,0.0015]) cables-['625-F', '500-F', 'RG-6 'RG-59' f1-100 f2-10000 df-100 N-int ((f2-f1)/df) freq-zeros (N) R-zeros( [4,N]) Ac-zeros ([4,N]) # add your codes here fig-figure(1) for i in range(len (cables)): semilogx(freq,R[i],label-cables [i]) grid(True) legend() xlabel('Freq. (MHz)); ylabel(r 'Rsistance($10mega/m$)"); show() fig.savefig( 'HW4-1-1',dpi-300) fig-figure(2) for i in range(len(cables)): plot(freq,Ac[i], label-cables [i]) grid (True) legend() xlabel('Freq. (MHz) ); ylabel (r 'Attenation ($dB/m$)'); show) fig.savefig('Hw4-1-2",dpi-300)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started