I write the code for double summation.The out put is wrong so what is problem in my logic

2 visualizaciones (últimos 30 días)
I want coding for double summation (r=0 to k)(s=0 to h) kroneckerDelta(r-1,h-s)*(k-r+1)*(k-r+2)C(k-r+2,s).K,h varies from 0,1,2,3,4,5..........I tried the following code the output is wrong for i=1:1:n+1 for j=1:1:n+1 ab(i,j)=(2*a*D1* kronDel(i-1,j)*((n+1)-i+1)*((n+1)-i+2)*C1((n+1)-i+2,j))/j; end end
In this coding separte kronecker delta function is defined function d = kronDel(i,j)
if i == j d = 1; else d = 0; end Value of a=-0.9833;D=0.01; initial values are for i=1:1:n+5 C1(1,1)=0.030792+0.009208; C1(i,1)=(0.009208*((-0.00000588235)^(i-1))/factorial(i-1)); end

Respuestas (0)

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by