Skip to main content
10-Marble
March 15, 2024
Solved

Capacitor model unit issue

  • March 15, 2024
  • 3 replies
  • 4444 views

Hi,

I am trying to model a capacitor based of the input values for L and R and plot the results.

If I plotting unit-less then the calculation is OK, others I get wired values for Xc and Xl.

Can somebody can point me where is the problem?

Best answer by ttokoro

image.pngimage.pngimage.pngimage.pngimage.png

3 replies

19-Tanzanite
March 15, 2024

Are you looking at this?

Cornel_0-1710518458592.png

 

25-Diamond I
March 15, 2024

@Bogdan_d wrote:

Hi,

I am trying to model a capacitor based of the input values for L and R and plot the results.

If I plotting unit-less then the calculation is OK, others I get wired values for Xc and Xl.

Can somebody can point me where is the problem?


Yes 🙂

You assign the unit MHz TWICE! So "freq" ends up with unit Hz^2 or 1/s^2

You have two options to assign the unit just once, either in the "logspace" function or as a factor after it, but not both!

Werner_E_0-1710519685132.png

 

ttokoro
21-Topaz I
ttokoro21-Topaz IAnswer
21-Topaz I
March 16, 2024

image.pngimage.pngimage.pngimage.pngimage.png

t.t.
Bogdan_d10-MarbleAuthor
10-Marble
March 18, 2024

Hi,

Thank you to all for your quick answer.

I am still not able to plot the values. It is drive me crazy. For such a simple thing, I still cannot find error.

ttokoro
21-Topaz I
21-Topaz I
March 18, 2024

Attach it.

t.t.