https://github.com/pabrod/synchronization
Some numerical tools around the concept of synchronization
https://github.com/pabrod/synchronization
Last synced: 5 months ago
JSON representation
Some numerical tools around the concept of synchronization
- Host: GitHub
- URL: https://github.com/pabrod/synchronization
- Owner: PabRod
- License: mit
- Created: 2018-07-31T12:29:17.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-22T14:47:06.000Z (almost 8 years ago)
- Last Synced: 2025-08-10T10:41:41.172Z (11 months ago)
- Language: Matlab
- Size: 845 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# About
This repository contains some pieces of code inspired by the reading of _Sync, by Steven Strogatz_.
# Author
- Pablo Rodríguez-Sánchez
- https://pabrod.github.io
- Wageningen University and Research.
# Content
## kuram
class representing a Kuramoto system of oscillators
### Examples
#### Construction
```
N = 100; % Number of oscillators
qs = linspace(0, 2*pi, N); % Initial states
ws = 5 + 2.*randn(N, 1); % Initial frequencies
% Coupling parameters
K = 7;
r = 1;
% Object construction
kur = kuram(qs, ws, K, r);
```
#### Plotting
```
figure;
kur.plot(); % Plot states
hold on;
kur.plotop(); % Plot order parameter
hold off;
```
```
figure;
kur.plotfreq(); % Plot frequencies
```
```
ts = 0:0.01:1;
filename = 'animation.gif'
kur.animate(ts, filename);
```
