Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

* IN MATLAB DEFINE: Write a program that loops through numbers 1-1000. Then, check which numbers are part of the Fibonacci sequence. Note that the

* IN MATLAB

image text in transcribed

DEFINE: Write a program that loops through numbers 1-1000. Then, check which numbers are part of the Fibonacci sequence. Note that the Fibonacci sequence begins with 0 and 1 , and then all following items in the sequence are the sum of the two previous items. For example, the first 6 numbers in the sequence are 0,1,1,2,3, and 5. You should only print out numbers that are part of the Fibonacci sequence (do not print out all numbers). MEASURE: - Is a number part of the Fibonacci sequence? - Hint: One way to do this is to check these equations below where " n " is the number you are checking. If either of these results is a perfect square (the result of multiplying a number by itself), it is part of the sequence. (5n2+4)(5n24) ANALYZE: - How do you make a list of numbers that goes from 1 to 1000? (Indexing) - How do you check if a number is part of the Fibonacci sequence (see hint above) - How do you only print values that are part of the sequence? IMPROVE: Code your solution in MATLAB, making sure that your solution both runs and produces the desired results. Then, turn in a PDF of your code to the D2L Dropbox following the naming format: lastName_firstName_LoopsCode.pdf Note that you can simply copy and paste your code into a program like Microsoft Word and save the file as a PDF or use the publish command to easily generate a PDF of your code. You can not submit images of your code - I must be able to copy and paste your code to test it. Remember that there is a special folder named "Late Labs" for anyone who misses the deadline but still wishes to submit their lab. Note that this DropBox also has a date where it will lock, and any assignments submitted here will be subject to a 30 -point penalty

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions