I am new to matlab and I want to solve above equation using matlab bvp4c.
The boundary conditions are - , , , . I want to plot the following graph( only the bottom cure and not all the curves) - But my code gives a different graph.
Can anyone please help me?
The matlav code i am trying is as follows-
function dxdy = mat4ode(~,y)
E=169e9;
w=10e-6;
t=2e-6;
I=(w*(t^3))/12;
V=2.3;
e0=8.854187817e-12;
e1 = 7.5*e0;
d1 = 20e-9;
h0=2e-6;
qx = (V^2*w/(2*E*I))*(1 + 0.65*(h0+y(1))/w)/(e0*( d1/e1 + (h0+y(1))/e0 )^2);
dxdy=[y(2)
y(3)
y(4)
qx];
end
function res = mat4bc(ya,yb)
res=[ya(1)
ya(2)
yb(3)
yb(4)];
end
function mat4bvp
options = bvpset('RelTol', 1e-8, 'AbsTol', 1e-8);
i =0;
solinit = bvpinit(linspace(0,450e-6,100),[i i i i]);
sol = bvp4c(@mat4ode,@mat4bc,solinit,options);
x = linspace(0,450e-6);
y = deval(sol,x);
h = 2e-6 - y(1,:);
plot(1e6*sol.x,1e6*h);
xlim([0,450])
ylim([0,2])
end