Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Tribonacci numbers are like Fibonacci numbers, except they have three starting terms that are predetermined and each subsequent term is the sum of the three

Tribonacci numbers are like Fibonacci numbers, except they have three starting terms that are predetermined and each subsequent term is the sum of the three preceding terms.

The first three terms are 0, 0, and 1. You should manually define these before the for loop.

The first 10 Tribonacci numbers are: 0, 0, 1, 1, 2, 4, 7, 13, 24, and 44 for your reference.

The Reciprocal Tribonacci sequence is the inverse of each Tribonacci number, starting with the third number (as the first two are zeros). You should manually define the first Reciprocal Tribonacci number (1) before the for loop.

The first 8 Reciprocal Tribonacci numbers are: 1, 1, 1/2, 1/4, 1/7, 1/13, 1/24, and 1/44 for your reference.

Write a program in correct Matlab syntax using a for loop that will create the first 15 elements of the Tribonacci number sequence and the corresponding first 13 Reciprocal Tribonacci numbers as two different vectors. Do not enter the values explicitly for the Tribonacci numbers (except for the first three) or the Reciprocal Tribonacci numbers (except for the first one), have the program compute each one (starting with the 4th Tribonacci number and the 2nd Reciprocal Tribonacci number). Display the entire Reciprocal Tribonacci number vector after the loop executes, not inside of the loop. Explicitly define the number of terms in your code. There should not be any user input in your code for this problem.

You must use the Trib variable to define the first 15 elements of the Tribonacci sequence and the Recip_Trib variable to define the corresponding first 13 terms of the Reciprocal Tribonacci sequence.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions