-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathASET_ExtrapV3pt.m
39 lines (24 loc) · 1.22 KB
/
ASET_ExtrapV3pt.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function [VelExtra]=ASET_ExtrapV3pt(V,C_vel,j,Cut_vel)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This function extrapolate in surface and bottom the velocity value using
% the 3 first and the last valid data.
% by Dominguez Ruben, L. FICH-UNL
%%%%%%%%%%%%5%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Linear Velocity Extrapolation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Surface Extrapolation
Velsurf=V.mcsMag(Cut_vel.Velcut1(1,j):Cut_vel.Velcut1(1,j)+2,j)./100;%m/s
Depthsurf=V.mcsBed(1,j)-V.mcsDepth(Cut_vel.Velcut1(1,j):Cut_vel.Velcut1(1,j)+2,j);
linearsurf=polyfit(Depthsurf,Velsurf,1);
%%%%%
%Define vector predection
VelExtra.predsurf=polyval(linearsurf,C_vel.zpredsurfvel(:,j));
VelExtra.surf=polyval(linearsurf,C_vel.zsurfvel(:,j));
%%Bottom extrapolation
Velbottom=V.mcsMag(Cut_vel.Velcut2(1,j)-2:Cut_vel.Velcut2(1,j),j)./100;
Depthbottom=V.mcsBed(1,j)-V.mcsDepth(Cut_vel.Velcut2(1,j)-2:Cut_vel.Velcut2(1,j),j);
linearbottom=polyfit(Depthbottom,Velbottom,1);
%Define vector predection
VelExtra.predbottom=polyval(linearbottom,C_vel.zpredbottomvel(:,j));
VelExtra.bottom=polyval(linearbottom,C_vel.zbottomvel(:,j));