Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.) In a MATLAB script, create an array of the first few Fibonacci numbers: fib_list = [1,1,2,3,5,8,13,21,34,55, 89, 144]. Write a short script which uses

image text in transcribed

1.) In a MATLAB script, create an array of the first few Fibonacci numbers: fib_list = [1,1,2,3,5,8,13,21,34,55, 89, 144]. Write a short script which uses a loop and a conditional if...end statement to count the number of entries in this list which are even and the number of entries which are odd. (Yes, I know you can count them yourself without MATLAB, but you're building a tool which could work on a list of millions of numbers so you wouldn't have to count it by hand). Have your script output the result for both the number of even entries and the number of odd entries in the command window. Publish a PDF of your code, print it out, and and turn it in with this pre-lab assignment

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

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

1844804526, 978-1844804528

More Books

Students also viewed these Databases questions

Question

What are the concerns with consumer information adequacy?

Answered: 1 week ago

Question

b. Explain how you initially felt about the communication.

Answered: 1 week ago

Question

3. Identify the methods used within each of the three approaches.

Answered: 1 week ago

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago