I need to calculate the infinite summation of this equation for different values of x, using a for loop
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Siddhant Khadgi
el 23 de Feb. de 2023
Respondida: Torsten
el 23 de Feb. de 2023
Hey guys
I need to find the value of T for different value of x. The values of x are stored in an array and the value of t is constant. And k, c and rho are also constant. I tried symsum, but im getting the following error:
Unable to perform assignment because value of type 'sym' is not convertible to 'double'.
0 comentarios
Respuesta aceptada
Torsten
el 23 de Feb. de 2023
L = 1;
n = 1:500;
lambda = (2*n-1)*pi/(2*L);
alpha = 1;
t = 0.1;
x = (linspace(0,L,100)).';
f = (-1).^(n+1)./(2*n-1).*exp(-alpha*lambda.^2*t).*cos(lambda.*x);
T = 4/pi*200*sum(f,2);
plot(x,T)
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!