phoenixman
10-11-2006, 02:43 PM
I am in dire need of help for a matlab program, i cannot figure out what to write for it. here is the problem:
write a function Prob8_A_8 that (a) returns the value of N such that the series sum for (this is tricky){ sideways-M with a small "n" on top and a k=1 underneath it} is precise to within 0.001 and (b) returns the value of the series to that precision.
since this infinite series is monotonous, you can determine when to stop (and to stop using break) by comparing the sum after M terms have been added, to the sum after M-1 terms have been added:
sum(subscript m) - sum (subscript m-1) < 0.001, then N=M
this problem is common when dealing with computing an infinite series. you cannot set up your computational loop to do an infinite number of iterations through the loop because that would require infinite time. the solution to determine a degree of precision that you will be content with, then stop the loop and return the answer when that level of precision is reached."
i dont know anything about matlab, someone please help me...... make the code as simple as possible...
write a function Prob8_A_8 that (a) returns the value of N such that the series sum for (this is tricky){ sideways-M with a small "n" on top and a k=1 underneath it} is precise to within 0.001 and (b) returns the value of the series to that precision.
since this infinite series is monotonous, you can determine when to stop (and to stop using break) by comparing the sum after M terms have been added, to the sum after M-1 terms have been added:
sum(subscript m) - sum (subscript m-1) < 0.001, then N=M
this problem is common when dealing with computing an infinite series. you cannot set up your computational loop to do an infinite number of iterations through the loop because that would require infinite time. the solution to determine a degree of precision that you will be content with, then stop the loop and return the answer when that level of precision is reached."
i dont know anything about matlab, someone please help me...... make the code as simple as possible...