recurrence relation calculation comparison error

1 Ansicht (letzte 30 Tage)
yogeshwari patel
yogeshwari patel am 14 Mär. 2022
Kommentiert: Torsten am 14 Mär. 2022
I dont get the idea how to calculate the recurrsive relation .I started with following code but got stuck in the for loop
syms x a B
U=sym(zeros(1));
U(1)=a;
alpha=10;
g=0.01;
B=sym(zeros(1));
for k=1:10
B=0;
for m=1:k
B=B+U(m)*(k-m+1)*(k-m+2)*U(k-m+2)
end
k*(k+1)*U(k+2)+alpha*B=g*U(k)
end
The problem is attached
  1 Kommentar
Torsten
Torsten am 14 Mär. 2022
Solve for U(k+2) using paper and pencil.
Then you get an explicit recursion.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by