Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (19 sloc) 554 Bytes
function [w] = membrane_solution(T,P,n)
od = ones(n^2-1,1);
od(n:n:end) = 0;
a = -4*diag(ones(n^2,1))+diag(ones((n^2)-n,1),n)+diag(ones((n^2)-n,1),-n)+diag(od,1)+diag(od,-1);
y = -(10/(n+1))^2*(P/T)*ones(n^2,1);
w = a\y;
grid on
[x,y] = meshgrid(0:10/(n+1):10,0:10/(n+1):10);
z = zeros(size(x));
z(2:end-1,2:end-1) = reshape(w,[n n]);
surf(x,y,z)
title('Membrane Displacement')
xlabel('X (\muM)')
ylabel('Y (\muM)')
zlabel('Displacement (\muM)')
colormap jet
shading interp
disp(w)
end
You can’t perform that action at this time.