Results 1 to 2 of 2

Math Help - Matlab

  1. #1
    Newbie
    Joined
    Apr 2010
    Posts
    14

    Matlab

    Factorials are used for many different applications, such as Taylor series, combinatorial probability, permutations and modelling rate of growth. The factorial of a positive integer n is defined as:



    Alternatively, the factorial of n can be written recursively as



    (a) Write a function that calculates the factorial using a loop:
    function f = MyFactorial(x)

    (b) Write an m-file that prompts the user to enter a number and uses the function in part (a) to calculate the factorial.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Mar 2007
    Posts
    206
    Awards
    1
    A good problem for anyone starting out with any programming language. Where are you having problems and what have you got so far.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Matlab help
    Posted in the Math Software Forum
    Replies: 1
    Last Post: February 11th 2010, 03:59 AM
  2. Matlab FFT Help
    Posted in the Math Software Forum
    Replies: 0
    Last Post: June 3rd 2009, 01:48 PM
  3. help about ODE in matlab
    Posted in the Math Software Forum
    Replies: 1
    Last Post: May 31st 2009, 04:10 AM
  4. Matlab
    Posted in the Math Software Forum
    Replies: 0
    Last Post: November 6th 2008, 09:46 AM
  5. Matlab
    Posted in the Calculus Forum
    Replies: 3
    Last Post: August 20th 2008, 11:39 PM

Search Tags


/mathhelpforum @mathhelpforum