フィルターのクリア

infinite series approximation program?

1 回表示 (過去 30 日間)
Otto
Otto 2012 年 10 月 21 日
回答済み: Korhan Babacan Yilmaz 2014 年 10 月 13 日
Hi all,
I am a beginner in MATLAB. My problem is about writing an infinite series approximation to a function f(1/5),that stops when the stopping criterion is met. Stopping criterion is given as Es=(0.5x10^2-n).Program should automatically terminate when Ea<Es. Also displaying the results in tabulated form which 1'st column shows the number of the terms, 2'nd column lists corresponding approximation for f(1/5), 3'rd column shows the true value of f(1/5),4'th and 5'th columns indicate the corresponding values of Et and Ea respectively.
Function and the series are like that: f(x)=7x^3/1-x=∑ 7x^n where initial value of n=3 and n goes to infinity.
I thought about using while loop with Ea<Es criterion, but i couldn't succeed to run the m-file.
Thanks for any immediate help, I have very short time to write this code for a project.
  1 件のコメント
Otto
Otto 2012 年 10 月 23 日
anyone to solve this problem?

サインインしてコメントする。

回答 (2 件)

Sachin Ganjare
Sachin Ganjare 2012 年 10 月 22 日
  1 件のコメント
Otto
Otto 2012 年 10 月 22 日
First of all, thanks for your interest. The problem is not exactly writing an infinite series approximation in MATLAB. Keypoint of this problem is writing a program which stops when the stopping criterion Ea<Es is met. I've done something using While loop for Ea<Es criterion but something went wrong. My Question is mainly about writing this commands by true order in MATLAB.Here is my worksheet;
x=0.2; Es=(0.5*10.^(2-n)); Ea=(x(i)-x(i-1)/x(i))*100; s=0 n=3:inf; i=1:inf; while abs(Ea)>Es; s=s+7*x^n end
I have tried something like this but went wrong.
I will appreciate for any help,
Thank you again.

サインインしてコメントする。


Korhan Babacan Yilmaz
Korhan Babacan Yilmaz 2014 年 10 月 13 日
has anyone found the solution ?

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by