How can I improve accuracy using bvp4c?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, I solved an ODEs system with BCs. The system is a bit complicated, it consists of 10 second order equations (thus, 20 first order equations).
My script is as follows:
xmesh = linspace(1e-6,1.5, 5000);
solinit = bvpinit(rmesh,[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1]);
sol = bvp4c(@bvpfcn,@bcs,solinit);
However, I receive two types of messages (the first is only an example):
1) Warning: Unable to meet the tolerance without using more than 500 mesh points.
The last mesh of 5000 points and the solution are available in the output argument.
The maximum residual is 376.47, while requested accuracy is 0.001.
Or
2) Out of memory
The solution of the system exists but is unrealistic: variables assumes negative values, while they should be always positive.
I tried many things: changing initial guess of solution, xmin and xmax, the number of points specified in linspace, adding the optional Nmax equals to 500000...but I always receive one of the two messages.
What should I do?
Thank you!
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Boundary Value Problems finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!