Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Can this dsolve code find solution recursively

1 Ansicht (letzte 30 Tage)
MINATI PATRA
MINATI PATRA am 20 Okt. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 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

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by