Skip to content

Commit

Permalink
Add non-autonomous systems to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
maurosilber committed Apr 3, 2024
1 parent d0c184a commit 7ff22e4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,26 @@ time
2 -0.416308 -0.909791
```

### Non-autonomous systems

To use the independent variable,
we create an instance of `Independent`:

```python
>>> from poincare import Independent
>>> class NonAutonomous(System):
... time: Independent = Independent()
... x: Variable = initial(default=0)
... eq = x.derive() << 2 * time
...
>>> Simulator(NonAutonomous).solve(save_at=range(3))
x
time
0 0.000000
1 1.000001
2 4.000001
```

### Constants, Parameters, and functions

Besides variables,
Expand Down

0 comments on commit 7ff22e4

Please sign in to comment.