Calculating a series function

5 次查看(过去 30 天)
bbah
bbah 2020-6-11
Dear Matlab Community,
i have a problem regarding the following equation which i want to calculate: The Input are lambda, beta, D_z, M_inf, h and K
The output should be M(t) = M_t:
My Code is as follows but it is not working properly:
M_inf = 1.85;
mu = 0.1;
lambda = 4.51;
beta = 4.51;
D_z = 5.32;
h = 1.5;
K = pi^2*D_z/h^2;
M_t=zeros(600,1);
for t=1:600
syms i
r_plus = 0.5*((K*i^2+lambda+beta)+sqrt((K*i^2+lambda+beta)^2-4*K*beta*i^2));
r_minus = 0.5*((K*i^2+lambda+beta)-sqrt((K*i^2+lambda+beta)^2-4*K*beta*i^2));
M_t(t,1) =M_inf*(1-8/(pi^2)*symsum((r_plus*exp(-r_minus*t)-r_minus*exp(-r_plus*t))/(i^2*(r_plus-r_minus)),i,1,inf)...
+8/(pi^2)*(K*(beta/(beta+lambda)))*symsum((exp(-r_minus*t)-exp(-r_plus*t))/(r_plus-r_minus),i,1,inf));
end
I hope somebody can help me

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by