I get the error "Undefined function 'symsum' for input arguments of type 'double'. while solving the equation given below.Please help me.
2 ビュー (過去 30 日間)
古いコメントを表示
PARVEEN KUMAR SINGHAL
2020 年 2 月 23 日
コメント済み: PARVEEN KUMAR SINGHAL
2020 年 2 月 25 日
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,'*')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/273175/image.jpeg)
3 件のコメント
Walter Roberson
2020 年 2 月 23 日
In particular you had
syms k
k=2
But the second line removes the identity of k as a symbolic variable
採用された回答
Cameron B
2020 年 2 月 23 日
編集済み: Cameron B
2020 年 2 月 23 日
I ran the script below and got a very large answer. You should check my code/output as there may be a mistake (using matlab mobile and don’t have time to check it), but at least there’s no error.
clc
clear all
syms k x
m=5;
alpha=2;
beta=(1.65)*(10^(-5));
sai=10;
rho=15;
pt=2;
pn=16.56*10^(-14);
c=(m*sai*pn)/(beta*pt);
fun=exp(-1.*(rho.*x + c.*x.^alpha)).*x.^(alpha*k);
g = symsum(1/factorial(k).*c.^k.*rho.*int(fun,0,inf),k,0,m-1);
g=double(g);
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!