-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathgeoplot.sce
42 lines (34 loc) · 1.03 KB
/
geoplot.sce
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
// Scilab script that loads a matrix with the geophone log file and plots
// it in a heatmap.
geophone_log = mopen( "geophone.log", "rt" );
log_entries = mgetl( geophone_log );
num_entries = size( log_entries );
mclose( geophone_log );
for x_time = 1:num_entries(1)
entry = log_entries( x_time );
y_tokens = [];
z_tokens = [];
log_token = strtok( entry, "," );
y_tokens = [ y_tokens, log_token ];
while( log_token <> '' )
log_token = strtok( "," );
z_tokens = [ z_tokens, log_token ];
log_token = strtok( "," );
y_tokens = [ y_tokens, log_token ];
end
y_elements=size(y_tokens);
y_tokens=y_tokens(1:y_elements(2)-1);
y_elements = size( y_tokens );
for elements = 1:y_elements(2)
frequency = strtod( y_tokens(elements) );
amplitude = strtod( z_tokens(elements) );
z_amplitude(x_time,frequency) = amplitude;
end
end
z_size = size(z_amplitude);
maxfreq = z_size(2);
y_frequency = 1:maxfreq;
x_time = 1:x_time;
f = scf( );
plot3d1( x_time, y_frequency, z_amplitude, alpha=60.5, theta=-90 );
f.color_map = hotcolormap(32);