%% PLOT ALL RESULTS clear all close all clc % Read in data files with ALL nodes xyu=dlmread('hw1allnodesoln.dat') x=xyu(:,1); y=xyu(:,2); u=xyu(:,3); [yn,xn]=meshgrid(-1.02:.01:1.02,-1.02:.01:1.02); % Display #1 in 2D figure Un=griddata(x,y,u,xn,yn); % Calculate the interpolated values for plotting on a finer grid system contourf(xn,yn,Un,100,'LineStyle','none') %Plot a filled 3D Contour without lines set(gca,'DataAspectRatio',[1 1 1]) % fix the aspect ration to 1:1:1 axis image % Display #2 in 3D figure surf(Un) % Read in dU/dx and dU/dy results for vector plotting vel=dlmread('hw1derivativeuinterior.dat') xx=vel(:,1); yy=vel(:,2); uu=vel(:,3); vv=vel(:,4); figure quiver(xx,yy,uu,vv),axis image