I have a series of Mathematica codes to plot the Gain of a Parallel RLC Circuit and the value of Q, etc.
The codes are attached as a picture.
But, unfortunately, it does not draw a diagram.
Wondering if somebody could tell me the error.
Repost your code in a readable form.
This Mathematica file attached needs to be modified and corrected.
Wondering if one could help find the errors.
You used lower case "c" in Gain definition but upper case "C" in the function. Change to
Gain[R_, L_, c_, f_] := 1/(
R Sqrt[(1/R)^2 + (2 \[Pi] f c - 1/(2 \[Pi] f L))^2])
and it will work properly.
Also, It is generally a bad idea to start your definitions with upper case characters because you can interfere with the internals of Mathematica. For example "C" has special meaning in Mathematica, but "c" does not. I would make all your functions like "Gain" be "gain" etc because you will suddenly be surprised when you bump into an internal Mathematica function or variable.
Thanks a lot for your help.