| 1 |
adj = load('cell_to_node_quad.txt') + 1; %% load node adjacency table, increment by 1 for 1-based indexing |
| 2 |
|
| 3 |
nodes = load('nodes.txt'); %% load node coordinates |
| 4 |
|
| 5 |
data_obj = importdata('mean_state.txt', ' ', 2); %% we need to skip the first two lines |
| 6 |
state = data_obj.data; |
| 7 |
figure(1) |
| 8 |
trisurf(adj, nodes(:,1), nodes(:,2), state); |
| 9 |
shading interp; |
| 10 |
view(0,90) |
| 11 |
axis equal |
| 12 |
axis tight |
| 13 |
|
| 14 |
data_obj = importdata('control.txt', ' ', 2); %% we need to skip the first two lines |
| 15 |
control = data_obj.data; |
| 16 |
figure(2) |
| 17 |
ind = find(nodes(:,2)==0); |
| 18 |
plot(nodes(ind,1),control(ind),'b','linewidth',3) |
| 19 |
axis square |