-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathf_plot_solution.m
More file actions
31 lines (25 loc) · 965 Bytes
/
f_plot_solution.m
File metadata and controls
31 lines (25 loc) · 965 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
function [] = f_plot_solution(x, rsol, usol, psol, esol, fign)
% Create a 2x2 subplot figure of the four solution quantities:
% density, velocity, pressure, and specific internal energy.
figure(fign)
hold on;
set(gcf, 'Color', 'w');
subplot(2,2,1)
plot(x, rsol, 'b', 'LineWidth', 2)
ylabel('$\rho$', 'Interpreter', 'Latex', 'FontSize', 14);
set(gca, 'FontName', 'Times', 'FontSize', 14)
subplot(2,2,2)
plot(x, usol, 'b', 'LineWidth', 2)
ylabel('$u$', 'Interpreter', 'Latex', 'FontSize', 14);
set(gca, 'FontName', 'Times', 'FontSize', 14);
subplot(2,2,3)
plot(x, psol, 'b', 'LineWidth', 2)
ylabel('$p$', 'Interpreter', 'Latex', 'FontSize', 14);
xlabel('$x$', 'Interpreter', 'Latex', 'FontSize', 14);
set(gca, 'FontName', 'Times', 'FontSize', 14);
subplot(2,2,4)
plot(x, esol, 'b', 'LineWidth', 2)
ylabel('$e$', 'Interpreter', 'Latex', 'FontSize', 14);
xlabel('$x$', 'Interpreter', 'Latex', 'FontSize', 14);
set(gca, 'FontName', 'Times', 'FontSize', 14);
end