Message Boards Message Boards

0
|
5685 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

[?] Make a project about parallel RLC circuit gain and Q?

Posted 4 years ago

Hello everybody. 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.

Regards.enter image description here

4 Replies

Dear Neil,

Thanks a lot for your help.

Mohammad.

Mohammad,

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.

Regards,

Neil

POSTED BY: Neil Singer

Hi. This Mathematica file attached needs to be modified and corrected. Wondering if one could help find the errors. Best regards.

Attachments:

Repost your code in a readable form.

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract