MATLAB code help

  • MATLAB
  • Thread starter EngWiPy
  • Start date
  • #1
1,367
61
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
 

Attachments

Answers and Replies

  • #2
MATLABdude
Science Advisor
1,655
4
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:

Related Threads on MATLAB code help

  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
2
Views
9K
  • Last Post
Replies
5
Views
3K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
13
Views
11K
  • Last Post
Replies
4
Views
649
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
2
Views
4K
Replies
3
Views
3K
Replies
6
Views
3K
Top