-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathplot_solution.m
More file actions
41 lines (30 loc) · 846 Bytes
/
Copy pathplot_solution.m
File metadata and controls
41 lines (30 loc) · 846 Bytes
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
clear all;
load 'variables.m';
output_t = variables(1);
numberReports = variables(2);
for report = 1:numberReports
figure(report)
time = (report-1)* (output_t/(numberReports-1))
filename = strcat('Solution', sprintf('%03d',[report]), '.m');
u = load(filename);
subplot(2,2,1)
plot(u(:,1),u(:,2));
xlabel('x');
ylabel('\rho');
title(strcat('Density (\rho) at time=',num2str(time)));
subplot(2,2,2)
plot(u(:,1),u(:,3));
xlabel('x');
ylabel('u');
title(strcat('Velocity (u) at time=',num2str(time)));
subplot(2,2,3)
plot(u(:,1),u(:,4));
xlabel('x');
ylabel('E');
title(strcat('Pressure (P) at time=',num2str(time)));
subplot(2,2,4)
plot(u(:,1),u(:,5));
xlabel('x');
ylabel('E');
title(strcat('Internal Energy (e) at time=',num2str(time)));
end