I am plotting the Real part of a complex equation which looks like this:
for now, using the FindMaximum function I can get the max y and max x of the plot, any ideas on how to get the FWHM of this peak?
the code I am using is:
Rhoq = 2.648*10^3; (**density of quartz crystal**)
Muq0 = 2.947*10^10; (**shear elastic modulus of quartz**),
CurlyEpsilonq = Superscript[3.982, -11]; (**permittivity**),
eq = Superscript[9.657, -2]; (**piezoelectric constant**)
Etaq = Superscript[9.27, -3]; (**effective quartz viscocity**)
f0 = 3*10^6; (**fundamental frequency of quartz AT 5 Mhz crystal**)
electrodediameter = Superscript[6, -3]; (**diameter of the front electrode**)
A=2*Pi*(electrodediameter/2)^2;
Zacoustic = Sqrt[Muq0*Rhoq];
vq0=Sqrt[Muq0/Rhoq];
hq=vq0/2*f0; (**thickness of the crystal**)
k=(eq^2)/(eq*Muq0);
capacitance=(A*CurlyEpsilonq/hq);
Muq=Function[{f}, Muq0+I*2*Pi*Etaq];
vq=Function[{f},Sqrt[Muq[f]/Rhoq]];
CurlyPhi=Function[{f},(2*Pi*f*hq/vq[f])];
Zquartz =Function[{f},(1/(I*2*Pi*f*capacitance))*(CurlyPhi[f]/(2*k*Tan[CurlyPhi[f]/2])-1)];
Y0 = Function[{f}, I*2*Pi*f*capacitance + 1/Zquartz[f]];
imagY0 = Function[{f}, Im[Y0[f]]];
realY0 = Function[{f}, Re[Y0[f]]];
ampY0 = Function[{f}, Abs[Y0[f]]];
Plot[realY0[f], {f, 2.99*10^6, 2.9906*10^6}, FrameLabel -> {"f (Hz)", "G quartz"}, Axes -> False, LabelStyle -> {FontFamily -> "Times New Roman", FontSize -> 18}, PlotRange -> Full, Frame -> True, GridLines -> Full, PlotStyle -> Black]
I tried to use the following:
maxquartzG1 = FindMaximum[realY0[f], {f, 2.99*10^6, 2.9906*10^6}][[1]];
halfG1=maxquartzG1/2;
f/.FindRoot[realY0[f]==halfG1,{f, 2.99*10^6, 2.9906*10^6}[[1]]
but this gives me one solution for frequency.
Thank you in advance,
Ioanna
A
andk
$\endgroup$