forked from esdsystems/TecDEM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
open_data_set.m
61 lines (43 loc) · 1.27 KB
/
open_data_set.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
function open_data_set(varargin)
% open_data_set.m
% This function is used to open any existing project specified by '_INFO.mat'.
%
%
% TecDEM: A MATLAB based tool box for understanding tectonics from digital
% elevation models.
% Faisal Shahzad
% TU Bergakademie, Freiberg, Germany
%
%
dispout = evalin('base','dispout');
tecfig = evalin('base','tecfig');
[areaname,location]=uigetfile('*_INFO.mat');
if areaname ~= 0
evalin('base','clear all')
assignin('base','tecfig',tecfig);
assignin('base','dispout',dispout);
fls = strcat(location,areaname);
rest = load(fls);
rest.info.path = fls(1:end-9);
r = [rest.area_info.Height rest.area_info.Width];
assignin('base','area_info',rest.area_info);
assignin('base','info',rest.info);
assignin('base','dispout',dispout);
assignin('base','r',r);
try
load_grid_base('base','stream');
end
textfile = strcat(fls(1:end-9),'_info.txt');
fid=fopen(textfile,'r');
while 1
tline = fgetl(fid);
if ~ischar(tline),
break
end
add_histroy({tline});
end
s = {strcat('Project_***', rest.info.project_name(1:end-4) ,'***_Loaded successfully.')};
add_histroy(s);
add_comm_line();
end