Page 1 of 1

using mat lab

Posted: Wed Apr 27, 2022 3:30 pm
by answerhappygod
using mat lab
Using Mat Lab 1
Using Mat Lab 1 (51.19 KiB) Viewed 27 times
- produce a list of the first 12 numbers in the Fibonacci sequence. create a matrix F which holds the first 45 numbers in the Fibonacci sequence. Find a pattern for the odd and even numbers in the Fibonacci sequence. Explain why this pattern will always work. Create a matrix called odds using odds = F(1:2:length(F)) which contains the Fibonacci numbers in the odd positions i.e. the 1st+3rd +5th +7th ..., and another matrix called evens which contains those in the even positions i.e. the 2nd+4th+6th+8th... Explain how this command produces the desired matrix. Write a similar command for evens. Use the function cumsum to create a matrix sumofodds that contains a cumulative sum of the elements in the odds matrix Create a similar matrix for the cumulative sum of the evens matrix a