Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to output data to a file

Here is my code that graphs a function:

z1=2pi650*10^6

p1=2pi1.95*10^9

p2=2pi5*10^9

adc=.667

deltaF=.1*10^9

N=(adcp1p2)/z1

M(freq)=(2ipifreq+z1)/((2ipifreq+p1)(2ipifreq+p2))

Z=abs(N*M(freq))

g(freq)=20*log(Z,10)

pts=[(freq,g(freq).n()) for freq in srange(10^8,10^11,deltaF)]

list_plot(pts, plotjoined=True, scale='semilogx', gridlines="minor", ymin=-25, ymax=5)

How do I output this data to a file so I can compare it to data generated by another piece of software?

click to hide/show revision 2
No.2 Revision

How to output data to a file

Here is my code that graphs a function:

z1=2pi650*10^6

z1=2*pi*650*10^6
 p1=2*pi*1.95*10^9
 

p1=2pi1.95*10^9

p2=2*pi*5*10^9 adc=.667

p2=2pi5*10^9

deltaF=.1*10^9 N=(adc*p1*p2)/z1

adc=.667

M(freq)=(2*i*pi*freq+z1)/((2*i*pi*freq+p1)*(2*i*pi*freq+p2)) Z=abs(N*M(freq))

deltaF=.1*10^9

g(freq)=20*log(Z,10)

N=(adcp1p2)/z1

M(freq)=(2ipifreq+z1)/((2ipifreq+p1)(2ipifreq+p2))

Z=abs(N*M(freq))

g(freq)=20*log(Z,10)

pts=[(freq,g(freq).n()) for freq in srange(10^8,10^11,deltaF)]

srange(10^8,10^11,deltaF)]

list_plot(pts, plotjoined=True, scale='semilogx', gridlines="minor", ymin=-25, ymax=5)

ymax=5)

How do I output this data to a file so I can compare it to data generated by another piece of software?