You are Here: Home >< Maths

# matlab help needed!!! Watch

1. hi, i have reseach all over the internet for hours, tryed many ways, i found no solutions. Any help would be appreciated. please get back to me asap.

3. The Lucas sequence is similar to the Fibonacci sequence but is defined as
follows: L(0) = 2, L(1) = 1, and L(k) = L(k?1)+L(k?2) for k ³ 2.

a Write a MATLAB function to generate the first n+1 terms of the Lucas
sequence. Note that the Lucas series is indexed from 0. Because MATLAB
arrays and vectors are indexed from 1, the n+1 element in a MATLAB
vector must be the nth term of the Lucas series, L(n).

b What is the ratio between L(k)/L(k–1) as k becomes large? (i.e. around 15)

c The first 21 terms of the Fibonacci series are
F = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597,
2584, 4181, 6765]

Remember that MATLAB arrays and vectors are indexed from 1 so that
(like the Lucas series) F(n) is the n+1 term in a MATLAB vector listing the
Fibonacci series given above.

Verify for n = 2:20 that L(n) = F(n–1)+F(n+1),
Verify for n = 2:20, that 5F(n) = L(n–1)+L(n+1).
Verify for n = 2:10 that F(2n) = F(n) L(n).
In these three tests use MATLAB logic operator == .
4
2. There are lots of tutorials on the Mathworks website that give a beginner's guide to MATLAB.

The stuff you've been asked to do here is quite basic.

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: December 1, 2010
Today on TSR

### Cambridge interview invitations

Has yours come through yet?

### Official Oxford interview invite list

Discussions on TSR

• Latest
• ## See more of what you like on The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

• Poll
Useful resources

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams

## Groups associated with this forum:

View associated groups
Discussions on TSR

• Latest
• ## See more of what you like on The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

• The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.