1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sav [38]
1 year ago
14

Homework 8 Matlab Write a function called fibonacciMatrix. It should have three inputs, col1, col2, and n. col1 and col2 are ver

tical arrays of the same length, and n is an integer number greater than 2. It should return an output, fib, a matrix with n columns. The first two columns should be col1 and col2. For every subsequent column:
Computers and Technology
1 answer:
Amiraneli [1.4K]1 year ago
8 0

In this exercise we have to use the knowledge in computational language in python to write the following code:

We have the code can be found in the attached image.

So in an easier way we have that the code is:

<em>function v = myfib(n,v)</em>

<em>if nargin==1</em>

<em>    v = myfib(n-1,[0,1]);</em>

<em>elseif n>1</em>

<em>    v = myfib(n-1,[v,v(end-1)+v(end)]);</em>

<em>end</em>

<em>end</em>

<em>function v = myfib(n,v)</em>

<em>if nargin==1</em>

<em>    v = myfib(n-1,[0,1]);</em>

<em>elseif n>1</em>

<em>    v = myfib(n-1,[v,v(end-1)+v(end)]);</em>

<em>elseif n<1</em>

<em>    v = 0;</em>

<em>end</em>

<em>function [n] = abcd(x)</em>

<em>if (x == 1 || x==0)</em>

<em>    n = x; </em>

<em>    return</em>

<em>else</em>

<em>    n = abcd(x-1) + abcd(x-2);</em>

<em>end</em>

<em>end</em>

<em>fibonacci = [0 1];</em>

<em>for i = 1:n-2</em>

<em>    fibonacci = [fibonacci fibonacci(end)+fibonacci(end-1)];</em>

<em>end</em>

<em>>> myfib(8)</em>

<em>ans =</em>

<em>    0    1    1    2    3    5    8   13</em>

<em>>> myfib(10)</em>

<em>ans =</em>

<em>    0    1    1    2    3    5    8   13   21   34</em>

See more about python at  brainly.com/question/18502436

You might be interested in
Data are sent through a network on bundles called _______. select one:
hoa [83]
I think that the answer is packets.
4 0
2 years ago
Read 2 more answers
What are options in the Advanced tab in the Share Workbook dialog box? Check all that apply
madam [21]
Where are the options

7 0
3 years ago
Read 2 more answers
Which of the following operating systems includes a virtual assistant?<br> Group of answer choices
Anna [14]

Complete Question:

Which of the following operating systems includes a virtual assistant?

Group of answer choices

a. macOS

b. Linux

c. UNIX

d. Chrome OS

Answer:

a. macOS

Explanation:

Macintosh refers to a set of computers designed, developed and manufactured by Apple Inc. Apple officially began the sales of Macintosh on the 24th of January, 1984. The first designs of Macintosh are considered to be personal computers and had a mouse, in-built screen with a graphical user interface (GUI). The operating system designed and developed for Apple computers (MacBook) is known as macOS (Macintosh operating system).

A virtual assistant can be defined as a computer software program that is artificially intelligent to understand human voice commands and performs task for the end user based on instructions or commands.

Generally, macOS is an operating system that includes a virtual assistant referred to as Siri. Siri was developed and released by Apple on the 4th of October, 2011.

<em>Siri as a virtual assistant, is able to perform tasks such as setting reminders, scheduling events, media player controls, GPS navigation, internet search, answer some questions etc. </em>

3 0
2 years ago
A software-based _________ is dedicated to examining and blocking internet traffic.
igomit [66]

A software-based <u>Firewall</u> is dedicated to examining and blocking internet traffic.

7 0
3 years ago
Read 2 more answers
Please help!! I attached an image with the questions.
stira [4]

Answer:

why do you need help

Explanation:

yea

8 0
3 years ago
Other questions:
  • WILL UPVOTE ALL.
    7·1 answer
  • Need help this will affect my final grade in technology and the dead line has passed!!!
    11·1 answer
  • Which of the following is used by credit card companies to determine APR?
    10·2 answers
  • This is a text message that is stored on a user's computer by a Web server that helps trace the user's browsing habits. a. Scrip
    14·1 answer
  • How much time does a gold chest take to open
    11·1 answer
  • Recall that within our BinarySearchTree class the root variable is of type BSTNode. A BSTNode object has three attributes: info
    13·1 answer
  • Question # 6
    11·2 answers
  • Outline the dangers arising as a result of using computers​
    12·1 answer
  • Directions: Arrange the jumbled letters to make/form a new word. Then give a
    12·1 answer
  • 3. Why is human resource plan made​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!