Hello guys , please help me !

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 !

Antworten (2)

Image Analyst
Image Analyst am 16 Mär. 2014
Bearbeitet: Image Analyst am 16 Mär. 2014

0 Stimmen

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 am 16 Mär. 2014

0 Stimmen

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.

Kategorien

Mehr zu Scope Variables and Generate Names finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 16 Mär. 2014

Beantwortet:

am 16 Mär. 2014

Community Treasure Hunt

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

Start Hunting!

Translated by