How should I get multiple solutions related to different BCs in this script?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi, I'm solving a system of ODEs with BCs, with bvp4c function.
My simplified script is as follows:
rmesh = ...
solinit = ...
sol = bvp4c(@bvpfcn,@bcs,solinit);
function dydr = bvpfcn(r,y)
...
end
function res = bcs(ya,yb,C)
...
end
In this case, I solved this system with prefixed values of BCs, reported inside of the second function with the vector C. Thus, I have only one solution, which is related to those BCs values.
However, I'd like to solve this problem with a for loop, through different vectors as input in BCs function in order to have multiple distict solutions, one for every BCs I inserted.
Is this the correct way?
for i=1:10 % 10 vectors of BCs
rmesh= ...
solinit= ...
sol = ??
end
Obviously, I should pass one BC at a time, but I'm interested to do it all together.
Thank you!
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Boundary Value Problems についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!