%script for mass distribution correction for settling velocity

%% Parameters
H=10; %height of viewing window
Ws=linspace(0,2,200);
w=-1.5:0.5:1.5;
dt=30;
%create calculation vectors
[WS,W]=meshgrid(Ws,w);

%%Calculate & Plot
f=H./(H+dt*abs(W-WS));
h_line=plot(Ws,f);
h_leg=legend(num2str(w','%g mm/s'));
title('Sampling Correction for Settling Velocity')
xlabel('\itW_s\rm  [mm\cdots^{ -1}]')
ylabel('\itf_i\rm')
set(get(h_leg,'Title'),'String','\itw\rm','FontWeight','bold')
