I keep getting this for my function and I don't know how to fix it -- Undefined function 'symsum' for input arguments of type 'double'.
2 ビュー (過去 30 日間)
表示 古いコメント
This is what have, a pic is also attached of the problem, have to find phi values of n =5,10 and 50
function phi = prob2_6(n)
phi = 13/8 + symsum(((-1).^(n+1)).*factorial(2.*n+1)./factorial(n+2).*factorial(n).*((4).^(2.*n+3)),n,0,n)
return
0 件のコメント
回答 (2 件)
Image Analyst
2016 年 5 月 29 日
Can you use sum() instead?
3 件のコメント
Alex Lisichenko
2020 年 3 月 17 日
answer is
n = 0:N;
phi = 13/8 + sum(((-1).^(n+1)).*factorial(2.*n+1)./(factorial(n+2).*factorial(n).*((4).^(2.*n+3))))
VBBV
2023 年 1 月 5 日
format long
N = [5 10 50];
Phi = prob2_6(N) % call function by passing vector of values with range N
function phi = prob2_6(N)
for k = 1:length(N)
n = 0:N(k);
phi(k) = 13/8+sum(((-1).^(n+1).*factorial(2.*n+1))./(factorial(n+2).*factorial(n).*(4.^(2.*n+3))));
end
end
0 件のコメント
参考
カテゴリ
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!