-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextract_amer.m
More file actions
20 lines (13 loc) · 830 Bytes
/
extract_amer.m
File metadata and controls
20 lines (13 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clc; clear all; close all;
%% Load and reduce data
load('reduced_bathy.mat');
[reduced_depth, reduced_UTM_WE, reduced_UTM_SN] = reduceResolution(depth, UTM_WE, UTM_SN, 5);
reduced_UTM_WE = reduced_UTM_WE - min(reduced_UTM_WE);
reduced_UTM_SN = reduced_UTM_SN - min(reduced_UTM_SN);
[reduced_mesh_UTM_WE, reduced_mesh_UTM_SN] = meshgrid(reduced_UTM_WE, reduced_UTM_SN);
[fx,fy] = gradient(reduced_depth,0.2);
% Trajectories
figure; hold on;
mesh(reduced_mesh_UTM_WE, reduced_mesh_UTM_SN, reduced_depth);
quiver(reduced_mesh_UTM_WE, reduced_mesh_UTM_SN, fx, fy);
plot3([reduced_mesh_UTM_WE(1470), reduced_mesh_UTM_WE(1698), reduced_mesh_UTM_WE(7657)], [reduced_mesh_UTM_SN(1470), reduced_mesh_UTM_SN(1698), reduced_mesh_UTM_SN(7657)], [reduced_depth(1470), reduced_depth(1698), reduced_depth(7657)], 'ro');