Skip to content

Commit 807006a

Browse files
Merge pull request #341 from jaakkor2/patch-1
Add capacitor initial voltage to README.md example
2 parents 5ff27c8 + 362b137 commit 807006a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ The following is the [RC Circuit Demonstration](https://docs.sciml.ai/ModelingTo
4848
using ModelingToolkit, OrdinaryDiffEq, Plots
4949
using ModelingToolkitStandardLibrary.Electrical
5050
using ModelingToolkitStandardLibrary.Blocks: Constant
51+
using ModelingToolkit: t_nounits as t
5152

5253
R = 1.0
5354
C = 1.0
5455
V = 1.0
55-
@variables t
5656
systems = @named begin
5757
resistor = Resistor(R = R)
58-
capacitor = Capacitor(C = C)
58+
capacitor = Capacitor(C = C, v = 0.0)
5959
source = Voltage()
6060
constant = Constant(k = V)
6161
ground = Ground()

0 commit comments

Comments
 (0)