How to pass multiple vectors (possibly a matrix) to pdepe and output a respective vector matrix?
2 ビュー (過去 30 日間)
古いコメントを表示
Hi!
I have a matrix of parameters (lets say a design of experiments) which I would like to pass to pdepe and obtain a numerical output. That output will be used to calculate the flux and the flux is multipled by a bunch of constants to obtain my quanitity of interest. I want to then bunch up the quanity of the interest in a vector of similar dimensions to the experimental output to be able to fit coefficients to my coupled equations.
I need a way to pass my parameter matrix (lets say) x to obtain my I_num.
6 件のコメント
Torsten
2022 年 5 月 1 日
Pass the values of alphaa to the functions of pdepe where they are needed, e.g.
icfun = @(x) Uinit(x,alphaa(1))
sol = pdepe(m,pdefun,icfun,bcfun,xmesh,tspan,options)
function u0 = Uinit(x,alphaa)
u0 = alphaa;
end
採用された回答
Torsten
2022 年 5 月 2 日
optns = odeset('MaxStep',1e-00,'RelTol',1e-7,'AbsTol',1e-7);
for i=1:size(alphaa,1)
INIT = @(x) alphaa(i,1:3);
BC = @(xl, yl, xr, yr, t)PDE_PSw_EK_BC(xl, yl, xr, yr, t, epsilon, alphaa);
PDE = @(x, t, y, DyDx)PDE_PSt_EK(x, t, y, DyDx, beeta, alphaa)
sol{i} = pdepe(m, PDE,INIT, BC, x, tspan, optns);
end
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Geometry and Mesh についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!