SciFEM-Project_CoffeeMugSim.../mgrid_2/visualize_results.m
2026-01-26 17:24:33 +01:00

29 lines
No EOL
572 B
Matlab

%% Visualize results
%
% flatpak run org.octave.Octave <filename>
% or
% octave --no-window-system --no-gui -qf <filename>
%
% or
% matlab -nosplash < <filename>
clear all
clc
%%
fname = 'uv.txt';
[xc,ia,v] = ascii_read_meshvector(fname);
%h = trisurf(ia, xc(:,1), xc(:,2), v);
figure;
h = patch('Faces', ia, 'Vertices', xc, 'FaceVertexCData', v, ...
'FaceColor', 'interp', 'EdgeColor', 'k');
axis equal tight;
colorbar;
colormap(jet);
caxis([18 85]);
title('Heat distribution');
waitfor(h) % wait for closing the figure