Henri, you gave two examples with two different values of R: 40 in the first case and 1000 in the second. In the case with R=1000, the resonance is so damped that the peak at 1 / sqrt(LC) has disappeared, and the curve simply bends downwards.
You should define your frequency correctly, like fr= 2*pi*linspace(0,2ω,1000) or you should define your formula correctly y = abs(1 ./ (1+im*2*pi*fr*R*C-(2*pi*fr).^2*L*C)). Please do not mix angular frequency and frequency, because you are in troubles: I have been there. michele On Thu, Jun 16, 2016 at 3:13 PM, Henri Girard <henri.gir...@gmail.com> wrote: > 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) >> >