Skip to content
Permalink
75354811e5
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
30 lines (22 sloc) 607 Bytes

ME3255_FInalProject

I noticed that I was never assigned to a group so I did this project solo

Part A

function [w] = membrane_solution3(T,P)


    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);


    y = -(10/4)^2*(P/T)*ones(9,1);
    w = k\y;

grid on
    [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')
    xlabel('X (\muM)')
    ylabel('Y (\muM)')
    zlabel('Displacement (\muM)')

    disp(w)

end