필터 지우기
필터 지우기

ODE with BVP problem (getting an error I do not understand)

조회 수: 2 (최근 30일)
Joe
Joe 2013년 8월 11일
Hello I'm having trouble with a BVP question.
My code is:
function [x2,u2] = Problem3()
function dxdz = odeRHS(z,Z)
dxdz = [Z(2); Z(3); Z(4); (z-z^2)];
end
function bc = odeBCs(za,zb)
bc = [ za(1) za(2) zb(1) zb(4) - 0.8 ] end
solinit = bvpinit(0,0); %used bvp4c to solve the BVP Z = bvp4c(@odeRHS,@odeBCs,solinit); u2=Z.y(1,:) x2=Z.x
plot(x2, u2, 'g', 'LineWidth', 2) grid on
I keep getting these errors though.
Error using bvpinit (line 73) The entries of x must satisfy a = x(1) ~= x(end) = b.
Error in Problem3 (line 17) solinit = bvpinit(0,0);
Any help would be greatly appreciated !!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by