function plot_layer(i, k, r, OutputRs, type) coordinate=r.coordinates; nodes=r.nodes; nz=r.nz; nx=r.nx; ny=r.ny; nmc = size(nodes,1); % nel = size(nodes,2); nel = 4; if type == 1 % v = r.kx; v = OutputRs{i}.p; else v = 1-OutputRs{i}.sw;%º¬Æø±¥ºÍ¶È end dis = zeros(nel, nmc); x = zeros(nel, nmc); y = zeros(nel, nmc); for i = 1 :nmc for j = 1 :nel x(j, i) = coordinate(nodes(i,j), 1); y(j, i) = coordinate(nodes(i,j), 2); if j == 3 x(j, i) = coordinate(nodes(i,4), 1); y(j, i) = coordinate(nodes(i,4), 2); end if j == 4 x(j, i) = coordinate(nodes(i,3), 1); y(j, i) = coordinate(nodes(i,3), 2); end dis(j, i) = v(i+(nz-k)*nx*ny); end end % fill(x,y,dis,'EdgeAlpha',1); figure('color','w'); fill(x,y,dis,'EdgeColor','interp'); xlabel('x, m','FontSize',14); ylabel('y, m','FontSize',14); ax = gca; ax.FontSize = 14; axis equal; axis tight % xlim([0,60]); % ylim([0,60]); % clim([10,15]); colorbar colormap jet % fill(x,y,dis); % axis off