I get the error "Undefined function 'symsum' for input arguments of type 'double'. while solving the equation given below.Please help me.
Mostrar comentarios más antiguos
clc
clear all
syms m x k
m=5;
k=2;
alpha=2;
beta=(1.65)*(10^(-5));
sai=10;
rho=15;
pt=2;
pn=16.56*10^(-14);
g = @(x)symsum((((1/factorial(k))*(m*sai*pn/2*beta)^k)),k,0,m-1).*exp(-(rho.*x)+((m*sai*pn*x.^alpha)/(beta*pt)))*x.^(alpha*1);
format long
f= rho*integral(g,0,inf)
plot(alpha,f,'*')

3 comentarios
Star Strider
el 23 de Feb. de 2020
This runs without error and then yields an infinite result:
syms m x k
m=sym(5);
% k=sym(2);
alpha=sym(2);
beta=sym(1.65E-5);
sai=sym(10);
rho=sym(15);
pt=sym(2);
pn=sym(16.56E-14);
g = symsum((((1/factorial(k))*(m*sai*pn/2*beta)^k)),k,0,m-1).*exp(-(rho.*x)+((m*sai*pn*x.^alpha)/(beta*pt)))*x.^(alpha*1);
f= rho*int(g,x,0,inf)
plot(alpha,f,'*')
I leave the rest to you.
Walter Roberson
el 23 de Feb. de 2020
In particular you had
syms k
k=2
But the second line removes the identity of k as a symbolic variable
PARVEEN KUMAR SINGHAL
el 25 de Feb. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!