Commit 682c0e64 authored by Cadmus's avatar Cadmus

Make dmd_vortex executable from any directory

parent 15e67bf3
......@@ -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'})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment