-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplotting.m
56 lines (50 loc) · 961 Bytes
/
plotting.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
% Load the predicate data
data = load('output/predicate_data.mat');
% Extract data
X = data.X;
T = data.T;
real_q = data.real_q;
pred_q = data.pred_q;
error_q = data.error_q;
% Plot real data
figure;
contourf(X, T, real_q, 50, 'LineColor', 'none');
colorbar;
title('Real Data');
xlabel('x');
ylabel('t');
grid on; % or off
% Plot predicted data
figure;
contourf(X, T, pred_q, 50, 'LineColor', 'none');
colorbar;
title('Predicted Data');
xlabel('x');
ylabel('t');
shading interp;
% Plot error data
figure;
contourf(X, T, error_q, 50, 'LineColor', 'none');
colorbar;
title('Error Data');
xlabel('x');
ylabel('t');
shading interp;
% Plot 3d real data
figure;
surf(X, T, real_q, 'EdgeColor', 'none');
colorbar;
title('Real Data 3d');
xlabel('x');
ylabel('t');
zlabel('|q|');
shading interp;
% Plot 3d predicted data
figure;
surf(X, T, pred_q, 'EdgeColor', 'none');
colorbar;
title('Predicted Data 3d');
xlabel('x');
ylabel('t');
zlabel('|q|');
shading interp;