Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Felix Kong
libdmd
Commits
682c0e64
Commit
682c0e64
authored
Nov 27, 2020
by
Cadmus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make dmd_vortex executable from any directory
parent
15e67bf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
examples/dmd_vortex.m
examples/dmd_vortex.m
+7
-3
No files found.
examples/dmd_vortex.m
View file @
682c0e64
...
...
@@ -4,8 +4,12 @@
% Step 0: Load data and paths
clear
all
,
close
all
,
clc
addpath
(
'./..'
);
% dmd.m is in the folder above
load
data
/
VortexData
.
mat
% loads variables VORTALL, nx, ny
SCRIPT_PATH
=
mfilename
(
'fullpath'
);
SCRIPT_DIR
=
fileparts
(
SCRIPT_PATH
);
addpath
(
fullfile
(
SCRIPT_DIR
,
'..'
));
% dmd.m is in the folder above
load
(
fullfile
(
SCRIPT_DIR
,
'data'
,
'VortexData.mat'
))
% loads variables VORTALL, nx, ny
% Step 1: initialize DMD object with data
verbose
=
true
;
% print how long things take
...
...
@@ -39,7 +43,7 @@ subplot(3,1,1);
xIC
=
reshape
(
VORTALL
(:,
1
),
nx
,
ny
);
% vortex field first timestep
im
=
imagesc
(
xIC
);
% plot vorticity field for first timestep
load
data
/
colormap
.
mat
% loads variable 'CC'
load
(
fullfile
(
SCRIPT_DIR
,
'
data
'
,
'
colormap.mat
'
))
% loads variable 'CC'
colormap
(
CC
);
% use custom colormap
% clean up axes
set
(
gca
,
'XTick'
,[
1
50
100
150
200
250
300
350
400
449
],
'XTickLabel'
,{
'-1'
,
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment