Code covered by the BSD License
Highlights from
mpiv
-
gui_confirm_mpivstart(varargi...
MODALDLG Application M-file for untitled.fig
-
modaldlg(varargin)
MODALDLG Application M-file for untitled.fig
-
mpiv_gui(varargin)
MPIV_GUI M-file for mpiv_gui.fig
-
[ xi, yi, nx_start, ny_start,...
-
[iu_ft,iv_ft,iu_ip,iv_ip]=mpi...
-
[xi,yi,iu,iv,D]=mpiv( imr1, i...
-
func_countNaN( fi );
-
func_findpeak2( f, i_opt );
-
func_histfilter( u )
To calculate mean and standard deviation by filtering out the
-
func_smooth(z)
-
mpiv_smooth( iu, iv, i_plot)
-
mpiv_vor( u, v, i_plot)
% This program is to calculate and plot vorticity using PIV.
-
nanmean2(x)
% nanmean 2 average ignoring NaNs for 2D variable
-
piv_cor( im1, im2, ...
-
piv_crr( im1, im2, ...
-
piv_crs( im1, im2, ...
-
piv_mqd( im1, im2, ...
-
piv_mqd( im1, im2, ...
-
piv_mrs( im1, im2, ...
-
piv_windowsize( nx,ny, nx_pix...
-
vector_check( iu, iv, vec_std...
-
vector_filter_global( ui, vi,...
-
vector_filter_median( ui, vec...
-
vector_filter_vecstd( ui, vec...
-
vector_interp( ui, i_interp )
-
vector_interp_NaN( ui )
-
vector_interp_kriging( ui )
-
vector_interp_kriging( ui )
-
vector_interp_linear( ui )
-
vector_interp_linear( ui )
-
vector_interp_spline( ui )
-
test_findpeak2.m
-
View all files
from
mpiv
by Nobuhito Mori
PIV method in MATLAB
|
| func_histfilter( u ) |
function[ u_mean, u_std, u_med] = func_histfilter( u )
% To calculate mean and standard deviation by filtering out the
% large deviations
% Input variable "u" must be in row or column vector format
% Output:
% mean, standard deviation and median values
%
%======================================================================
% Terms:
%
% Distributed under the terms of the terms of the BSD License
%
%========================================================================
% --------------- Start Input -------------------
% Set range (times standard deviation)
std_limit = 2.0;
% ---------------End of Input -------------------
tmp = find(~isnan(u));
f = u(tmp);
f_mean = mean(f);
f_std = std(f);
% remove the values outside the "std_limitd" times "std" and recalculate mean and standard dev.
for i = 1:length(f)
if abs(f(i)-f_mean) > (std_limit*f_std)
f(i) = NaN;
end
end
tmp2 = find(~isnan(f));
f2 = f(tmp2);
u_mean = mean(f2);
u_std = std(f2);
u_med = median(f2);
|
|
Contact us at files@mathworks.com