My new tentative (which is not working)
using Plots
R=1000;L=1/pi*360E-2;C=1/(pi*360E+2)
w=1/sqrt(L*C)
f=1/(2*pi*sqrt(L*C))
omega=linspace(-f,f)
y=abs(1./(1+im.*omega.*R.*C-omega.*omega.*L.*C));
plot(omega,y,title="Fréquence de résonance",
bg=RGB(.2,.2,.2),xlabel ="Hz",ylabel = "Ω")
---------------------------------------
Working plot in sage,( I think the difference is var("f") and omega
 which is a symbolic variable
R=30;L=1/pi*360E-2;C=1/(pi*360E+2)
var("f")
omega=2*pi*f
w=1/(sqrt(L*C))
Fr=1/(2*pi*sqrt(L*C))
q=plot(abs(1/(1+i*omega*R*C-omega*omega*L*C)),
omega,0,100,figsize=4,frame=True,
     fontsize=8,axes=False,color="red")  
show(q)
print"Fréquence de résonance = ",round(Fr)," Hz"
Le jeudi 16 juin 2016 09:22:12 UTC+2, Henri Girard a écrit :
>
> Hi,
> When I make my plots I have two plots, but before I hadn't this...
> w is the resoning frequency, but it should appear at 0 (zéro) not at 
> extrem ? 
> Any help, I already ask for help with pyplot, this link : 
> https://groups.google.com/forum/#!topic/julia-users/EJSvutfdEus, which 
> works fine for angular pulsation, but I want frequency resonance with Plots 
> because I guess I can make more beautifull graphic (anyway I don't know 
> well PyPlot or Plots). I succeeded once with pyplot but after an error I 
> couldn't find it back !
> Bad luck :)
> Kind regards
> HG
>
> using Plots
> pyplot(reuse=true)
> z=10;u=0.02;s=0.02;w=1/(2*pi*sqrt(u*s))
> f=linspace(-30,30)
> y=abs(1./(1+im.*f.*z.*s-f.*f.*u.*s));
> #fig = figure("Angle")
> plot(f, y)
>

Reply via email to