So I tried to write on the screen symsum results, but one of them got a little bit wrong position
1 回表示 (過去 30 日間)
古いコメントを表示
syms n
%a
fprintf('a) %f\n',symsum((n+3^n)^(-1),n,1,2021))
%b
fprintf('b) %f\n',symsum((2*n+1)^n/n^(2*n),n,1,2021))
%c
fprintf('c) %f\n',symsum(n^2*exp(-n),n,1,2021))
%d
fprintf('d) %f\n',symsum(n^2*exp(-n^3),n,1,2021))
The 'b)' should be like others , but it was not
2 件のコメント
John D'Errico
2021 年 11 月 28 日
編集済み: John D'Errico
2021 年 11 月 28 日
Note that when you post only a picture of your code, then for us to correct it, we need to write your code ourselves, by copying by eye what you wrote. This is tedious. (It also risks a possibility that what you wrote had an unprintable character in line b.) It tends to make some of us less likely to try to help you. And that means it will take longer for you to get an answer. Is there a good reason why you want to make it more difficult to gain help for your question? This is especially true, since you could have included your code as text more easily than inserting a picture.
John D'Errico
2021 年 11 月 30 日
編集済み: John D'Errico
2021 年 11 月 30 日
When I paste your exact code into MATLAB, here is what I see:
>> syms n
%a
fprintf('a) %f\n',symsum((n+3^n)^(-1),n,1,2021))
%b
fprintf('b) %f\n',symsum((2*n+1)^n/n^(2*n),n,1,2021))
%c
fprintf('c) %f\n',symsum(n^2*exp(-n),n,1,2021))
%d
fprintf('d) %f\n',symsum(n^2*exp(-n^3),n,1,2021))
a) 0.392084
b) 5.152109
c) 1.992295
d) 0.369221
Is the b result on another line? NO.
So whatever you did to create that result from the picture, we cannot reproduce it. Even you cannot reproduce it.
Are you using an old version of MATLAB? Perhaps, but then you should have said so if that was the case.
回答 (1 件)
John D'Errico
2021 年 11 月 28 日
syms n
fprintf('a) %f\n',symsum((n+3^n)^-1,n,1,2021))
fprintf('b) %f\n',symsum((2*n+1)^n/n^(2*n),n,1,2021))
fprintf('c) %f\n',symsum(n^2*exp(-n^3),n,1,2021))
It seems to work just fine.
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!