Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help in Matlab problem !

  1. Dec 29, 2012 #1
    Help in Matlab problem!!!!!!

    Hello guys, I really need your help in this question, it's a maclaurin series and I don't know how to do it in matlab. here is the question :
    http://sphotos-a.ak.fbcdn.net/hphotos-ak-snc6/734976_2640341944275_792908261_n.jpg [Broken]

    I hope that you can help me ASAP :(
     
    Last edited by a moderator: May 6, 2017
  2. jcsd
  3. Dec 29, 2012 #2
    Re: Help in Matlab problem!!!!!!

    well...

    you first implement a function, macfun, that implements and evaluates the Maclaurin series for given values of n and x (these two would be the input arguments to the function).

    then

    1.- you set x = π/3, then
    2.- you set xactual = cos(x)
    3.- then, you pick a value for n, say 1 or 2, and
    4.- set xest to the value of the function macfun(n,x)
    5.- then you evaluate the percent error with the formula provided and see if it is less than 0.001...

    ...if not, increase n by 1 and go back to step 4
     
  4. Dec 29, 2012 #3
    Re: Help in Matlab problem!!!!!!

    thank you very much, I really appreciate it
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Help in Matlab problem !
Loading...