% PULLIN find pull-in voltage % [V]=pullin(a,g,L,W,E) % Calculate the pull-in voltage for the spring/gap structure in HW7 % a,g,L,W assumed in meters, E in Pascals function [V]=pullin(a,g,L,W,E) eps0 = 8.85e-12; vsquared = 8 .* E .* a.^3 .* g.^3/ (27* eps0 .* W .* L.^3) ; V = sqrt(vsquared);