Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Can this dsolve code find solution recursively

1 visualizzazione (ultimi 30 giorni)
MINATI PATRA
MINATI PATRA il 20 Ott 2020
Chiuso: MATLAB Answer Bot il 20 Ago 2021
syms x f f0(x) f1(x) f2(x) f3(x) f4(x) f5(x) f6(x)
eqn0 = diff(f1,3) == 0; cond0 = [f1(0) == 0, subs(diff(f1),0) == 0, subs(diff(f1),5) == 1 ];
f1 = dsolve(eqn0,cond0);
for m = 2:6
syms f_m
for k = 1:(m-1)
Df = diff(f); D2f = diff(Df); D3f = diff(D2f);
eqn(k) = D3f + (1/2)* f * D2f == 0;
cond(k) = [subs(f,0) == 0, subs(Df,0) == 0, subs(Df,5) == 0];
F = dsolve(eqn(k),cond(k)); f(k) = F.f(k)
end
end
disp([f2 f5 f])
%% I need (f1) to include in the loop to carry the solution and Please help me to run the code.
N.B: Two boundary conditions are different
PLEASE FOLLOW the attached pdf

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by