资源简介
进行模态分析的MATLAB程序,包括本征正交分解和动态模态分解
代码片段和文件信息
clear;clf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Higham J.E. Brevis W & Keylock C.J. (2018)
% Implications of the selection of a particular modal decomposition technique for the analysis of shallow flows
% Journal of Hydraulic Research
% Taylor and Francis
% 10.1080/00221686.2017.1419990
% Any questions email jonny.e.higham@gmail.com
%%%%%%%%%%%%%%%%%%% USAGE %%%%%%%%%%%%%%%%%%%%%%
% When the data is input the POD modes will be calculated after which you
% are promped with a window to choose the frequency highlighted in the
% particular POD mode which you would like the DMD algorithm to extract.
%%%%%%%%%%%%%%%%%% EXAMPLES %%%%%%%%%%%%%%%%%%%%
% Here we provide two examples ‘cylinder‘ & ‘groyne‘ change by either using
% ‘cylinder‘ or ‘groyne‘;
% Chose the cylinder example for one velocity component and the groyne for
% two velocity components (this can easily be extended to three components
%%%%%%%%%%%%%%%%%% INPUT %%%%%%%%%%%%%%%%%%%%%
freq = 5; %Hz; aquisition frequency
example = ‘cylinder‘; % input case (cylinder / groyne)
mode=2; % which mode to plot and extract DMD from
%%%%%%%%%%%%%%%%%%% script %%%%%%%%%%%%%%%%%%%%%
% Import the images from folder. The colour images are converted to
% grayscale.
data = [];
if strcmp(example‘cylinder‘)
directory = ‘data_cylinder‘;
count = 1;
while exist(sprintf(‘%s/B_%0.4d.bmp‘directorycount)) ~= 0 % exist 检验变量或文件是否存在 sprintf 格式化输出
data(::count) = imread(sprintf(‘%s/B_%0.4d.bmp‘directorycount)); % imread 图像读入
count = count +1;
end
r = size(data1); c = size(data2);
% Transform the data into column vectors.
data=reshape(datar*csize(data3)); % data 重构出 r*c X size(data3)的 矩阵
end
if strcmp(example‘groynes‘)
directory = ‘data_groynes‘;
count = 1;
while exist(sprintf(‘%s/PIV_%0.4d.mat‘directorycount)) ~= 0
load(sprintf(‘%s/PIV_%0.4d.mat‘directorycount))
data_u(::count) = u;
data_v(::count) = v;
count = count +1;
end
r = size(data_u1); c = size(data_u2);
% Transform the data into column vectors.
data=[reshape(data_ur*csize(data_u3));reshape(data_vr*csize(data_v3))];
end
%%%%%%%%%%%%%%%%%%% POD %%%%%%%%%%%%%%%%%%%%%%
% Perform the POD - this is mean subtracted for POD not for DMD
[Phi ~ C]=svd(data-repmat(mean(data2) [1 size(data2)])‘econ‘); % repmat 复制平铺矩阵 mean(data2)为行平均的列向量
% 奇异值分解(精简分解)
相关资源
- Pattern Recognition and Machine Learning(高清
- MATLAB 编程 第二版 Stephen J. Chapman 著
- 均值滤波和FFT频谱分析Matlab代码
- 《MATLAB扩展编程》代码
- HDB3码、AMI码的MATLAB实现
- 3点GPS定位MATLAB仿真
- MATLAB数字信号处理85个实用案例精讲入
- matlab从入门到精通pdf94795
- 欧拉放大论文及matlab代码
- 跳一跳辅助_matlab版本
- 全面详解LTE MATLAB建模、仿真与实现
- MIMO-OFDM无线通信技术及MATLAB实现_孙锴
- MATLAB Programming for Engineers 4th - Chapman
- matlab 各种谱分析对比
- 分数阶chen混沌matlab程序
- 基于粒子群算法的非合作博弈的matl
- MATLAB车流仿真 包括跟驰、延误
- matlab空间桁架计算程序
- 基于MATLAB的图像特征点匹配和筛选
- DMA-TVP-FAVAR
- GPS信号的码捕获matlab代码.7z
- 一维光子晶体MATLAB仿真代码吸收率折
- newmark法源程序
- 传统关联成像、计算鬼成像matlab
- pri传统分选算法
- 摆动滚子推杆盘形凸轮设计
- 医学图像重建作业matlab源码
- Matlab实现混沌系统的控制
- 检测疲劳驾驶
- Matlab锁相环仿真-Phase Locked Loop.rar
评论
共有 条评论