bvp4c error
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
.
0 comentarios
Respuestas (2)
Stephan
el 6 de Mzo. de 2020
Editada: Stephan
el 6 de Mzo. de 2020
solinit = bvpinit([0,1],[0,0]);
sol = bvp5c(@deriv,@bcs,solinit);
plot(sol.x,sol.y(1,:),'-r');
function dYdx = deriv(~,Y)
dYdx(1) = Y(2);
dYdx(2) = (Y(2)-exp(Y(1)))*100;
end
%boundary conditions y(a) = -1 and y(b) = 0
function res = bcs(ya,yb)
res = [ ya(1) + 1; yb(1) - 0];
end
0 comentarios
Ver también
Categorías
Más información sobre Boundary Value Problems en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!