Hello guys , please help me !

1 view (last 30 days)
Visan
Visan on 16 Mar 2014
Answered: Roger Stafford on 16 Mar 2014
Let the series S= ∑ 1/k!. Noting Sn=∑ 1/k! with partial sum of order n, write a program that receives as argument a strictly positive real number and subunit er displays all partial sums for which sn-e > er. After every 10 sums shown the user has to press a key before displaying the following sums. The program displays an error message if requirements are not met regarding the argument.
Help me please :D !
Thank you !

Answers (2)

Image Analyst
Image Analyst on 16 Mar 2014
Edited: Image Analyst on 16 Mar 2014
Hints, functions you may find useful: factorial(), mod() or rem(), sum(), uiwait(warndlg()), msgbox(), and fprintf(). Also look up for loops and how a function works. And after you read this, this, and this, if you still have problems then you can then read this and come back with your homework code and we'll help you through it..

Roger Stafford
Roger Stafford on 16 Mar 2014
Another hint. The quantity S of the infinite sum is the value of exp(x) when x = 1, assuming k starts at k = 0, so the 'e' you use should be exp(1).
The inequality you mention looks incorrect, since your Sn will always be less than the limit S (which is e.) Hence Sn-e is always negative.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!