Created
January 15, 2016 15:00
-
-
Save alexlib/cffe7a86b9ed53bd8205 to your computer and use it in GitHub Desktop.
Load PIVLab MAT files into PIVMAT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
directory = '~/Desktop/ariel_piv/test_7_res'; | |
fileList = dir(fullfile(directory,'test_7_*.mat')); | |
a = repmat(struct('x',[],'y',[],'vx',[],'vy',[],'choice',[],... | |
'unitx','px','unity','px','namex','x','namey','y',... | |
'unitvx','px/dt','unitvy','px/dt','namevx','vx','namevy','vy',... | |
'pivmat_version','3','ysign','','Attributes','',... | |
'name','','setname','','history',{{'PIVLab1.4'}},'source',''),1,length(fileList)); | |
for i = 1:length(fileList) | |
load(fullfile(directory,fileList(i).name)); | |
a(i).vx = transpose(u); | |
a(i).vy = transpose(v); | |
a(i).x = unique(x).'; | |
a(i).y = unique(y).'; | |
end | |
m = showf(filterf(interpf(a),1),'curl','all','spacing',2,'scalearrow',3,'rot'); | |
% movie2avi(m,'test_7') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment