From 0221c79916d476138347397a333e2031894945e8 Mon Sep 17 00:00:00 2001 From: Lucas T Dombroski Date: Thu, 14 Dec 2017 20:29:10 -0500 Subject: [PATCH] Update membrane_solution3.m --- Part A/membrane_solution3.m | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/Part A/membrane_solution3.m b/Part A/membrane_solution3.m index 91e2d25..bbd0c09 100644 --- a/Part A/membrane_solution3.m +++ b/Part A/membrane_solution3.m @@ -8,19 +8,6 @@ function [w] = membrane_solution3(T,P) % output: % w = vector of displacement of interior nodes -<<<<<<< HEAD - [x,y] = meshgrid(0:10/4:10,0:10/4:10); - z = zeros(size(x)); - z(2:end-1,2:end-1) = reshape(w,[3 3]); - surf(x,y,z) - title('Membrane Displacement (3 x 3)') - zlabel('Z Position (micron)') - ylabel('Y Position (micron)') - xlabel('X Position (micron)') - % Membrane displacement is shown on chart - -end -======= od = ones(8,1); od(3:3:end) = 0; k = -4*diag(ones(9,1))+diag(ones(9-3,1),3)+diag(ones(9-3,1),-3)+diag(od,1)+diag(od,-1); @@ -32,14 +19,18 @@ w = k\y; % Solves for displacement (micrometers) % Solution represents a 2D data set w(x,y) -[x,y] = meshgrid(0:10/4:10,0:10/4:10); -z = zeros(size(x)); -z(2:end-1,2:end-1) = reshape(w,[3 3]); -surf(x,y,z) -title('Membrane Displacement') -zlabel('Displacement (micrometer)') + + [x,y] = meshgrid(0:10/4:10,0:10/4:10); + z = zeros(size(x)); + z(2:end-1,2:end-1) = reshape(w,[3 3]); + surf(x,y,z) + title('Membrane Displacement (3 x 3)') + zlabel('Z Position (micron)') + ylabel('Y Position (micron)') + xlabel('X Position (micron)') + % Membrane displacement is shown on chart % Membrane displacement is shown on chart end ->>>>>>> 3217bec2baefdb9797b60fd7e29f12b838227cd0 +