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

MATLAB code help

  1. Jun 6, 2009 #1
    Hello,

    I have the following equation, and I want to program it using MATLAB. But it is a recursive function, and it seems that I can not handle it well. So please if any one can help, I will be thankful.

    attachment.php?attachmentid=19240&stc=1&d=1244335353.jpg
     

    Attached Files:

  2. jcsd
  3. Jun 7, 2009 #2

    MATLABdude

    User Avatar
    Science Advisor

    I would suggest you create a 2D matrix of size k (whatever that happens to be / you choose it to be--maybe this is a parameter that your function takes in?), seed the initial values given, and then make copious use of the for or while loops in MATLAB:
    http://www.mathworks.com/access/helpdesk/help/techdoc/learn_matlab/f4-1931.html#brbsthm [Broken]
    http://www.mathworks.com/access/helpdesk/help/techdoc/learn_matlab/f4-1931.html#brbstiw-1 [Broken]
     
    Last edited by a moderator: May 4, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: MATLAB code help
  1. MATLAB Code help! (Replies: 13)

  2. Matlab Coding Help ! (Replies: 3)

  3. Matlab code help (Replies: 5)

Loading...