# VMT_DxDyfromLB

## PURPOSE

Computes the x distance and y distance from the point on the left bank.

## SYNOPSIS

function A = VMT_DxDyfromLB(z,A,V)

## DESCRIPTION

     Computes the x distance and y distance from the point on the left bank.
     Left bank is defined by the mean flow direction for the set of transects.

     P.R. Jackson, USGS, 1-21-09

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

## SOURCE CODE

    0001 function A = VMT_DxDyfromLB(z,A,V)
    0002 % Computes the x distance and y distance from the point on the left bank.
    0003 % Left bank is defined by the mean flow direction for the set of transects.
    0004 %
    0005 % P.R. Jackson, USGS, 1-21-09
    0006
    0007 %V.mfd
    0008 %V.m
    0009
    0010 if V.mfd >= 270 | V.mfd < 90
    0011     for zi = 1 : z
    0012         A(zi).Comp.dx = abs(V.xw-A(zi).Comp.xm);
    0013         if V.m >= 0
    0014             A(zi).Comp.dy = abs(V.ys-A(zi).Comp.ym);
    0015         elseif V.m < 0
    0016             A(zi).Comp.dy = abs(V.yn-A(zi).Comp.ym);
    0017         end
    0018     end
    0019 elseif V.mfd >= 90 & V.mfd < 270
    0020     for zi = 1 : z
    0021         A(zi).Comp.dx = abs(V.xe-A(zi).Comp.xm);
    0022         if V.m >= 0
    0023             A(zi).Comp.dy = abs(V.yn-A(zi).Comp.ym);
    0024         elseif V.m < 0
    0025             A(zi).Comp.dy = abs(V.ys-A(zi).Comp.ym);
    0026         end
    0027     end
    0028 end
    0029
    0030
    0031
    0032