Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/kraketm/ConstrainedDMD
03 May 2026, 08:33:00 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    No releases to show
  • e660bed
  • /
  • main_demo_lynx.m
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:459b14dd1f78758af710d557c5495b5ef5834b08
origin badgedirectory badge
swh:1:dir:e660bed890263d42b89cb6dcb7ecd1a77acde20d
origin badgerevision badge
swh:1:rev:543b1af120732aa94738315eb75b8a4394caa951
origin badgesnapshot badge
swh:1:snp:3a2a144e060e76b48791aeb591bfbb26116f6bdd

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: 543b1af120732aa94738315eb75b8a4394caa951 authored by timkrake on 24 November 2022, 08:36:43 UTC
Update README
Tip revision: 543b1af
main_demo_lynx.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% Constrained Dynamic Mode Decomposition %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This is the main demo for 'Constrained Dynamic Mode Decomposition'.
%
% 
% The demo uses the lynx dataset (compare Figure 7, 8, and 9). It is an 
% univariate time series that consists of seasonal and cyclic patterns.
% These patterns are characterized by a non-integer period given by 9.63.
% Therefore, the time series describes no typical time-scale.

clear; close; clc;
addpath('toolbox/')


%% Input
DATA = IO_LoadData('lynx');                             % load lynx dataset


%% Original DMD
DMDOrig = DMD_ConstrainedDMD(DATA);                     % compute original DMD (Algorithm 1, line 1-7)
DMDOrig = DMD_InfluenceComputation(DATA, DMDOrig);      % compute influence of DMD components (Eq. 20)
DMDOrig = VIS_Filtering(DMDOrig, 1e-3, 5e-2);           % use filtering technique 

VIS_OverviewRepresentation(DATA, DMDOrig, 6)            % visualize DMD components (Fig. 7, 3rd column)


%% Constrained DMD - 1. human-in-the-loop feedback
periods1 = [9.63, 9.63/2]';
constrs1 = [exp(2*pi*1i./(periods1)); conj(exp(2*pi*1i./(periods1)))];
DMDCons1 = DMD_ConstrainedDMD(DATA, DMDOrig, constrs1); % compute constrained DMD (Algorithm 1, line 8-18)
DMDCons1 = DMD_InfluenceComputation(DATA, DMDCons1);    % compute influence of DMD components (Eq. 20)
DMDCons1 = VIS_Filtering(DMDCons1, 1e-3, 5e-2);         % use filtering technique 

VIS_OverviewRepresentation(DATA, DMDCons1,6)            % visualize DMD components (Fig. 8)
VIS_ChangeTracking(DMDOrig, DMDCons1)                   % change tracking of eigenvalues (Fig. 9, left)


%% Constrained DMD - 2. human-in-the-loop feedback
periods2 = [9.63, 9.63/2, 9.63*4, 9.63*2]';
constrs2 = [exp(2*pi*1i./(periods2)); conj(exp(2*pi*1i./(periods2)))];
DMDCons2 = DMD_ConstrainedDMD(DATA, DMDOrig, constrs2); % compute constrained DMD (Algorithm 1, line 8-18)
DMDCons2 = DMD_InfluenceComputation(DATA, DMDCons2);    % compute influence of DMD components (Eq. 20)
DMDCons2 = VIS_Filtering(DMDCons2, 1e-3, 5e-2);         % use filtering technique 

VIS_OverviewRepresentation(DATA, DMDCons2,6)            % visualize DMD components (Fig. 7, 4th column)
VIS_ChangeTracking(DMDCons1, DMDCons2)                  % change tracking of eigenvalues (Fig. 9, right)

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API