Hello guys , please help me !
Mostrar comentarios más antiguos
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 !
Respuestas (2)
Image Analyst
el 16 de Mzo. de 2014
Editada: Image Analyst
el 16 de Mzo. de 2014
0 votos
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
el 16 de Mzo. de 2014
0 votos
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.
Categorías
Más información sobre Scope Variables and Generate Names en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!