Question: In MATlab, Write a function that takes a number, n, as an input and returns an array, fib, that is the Fibonacci Sequence of length
In MATlab, 
Write a function that takes a number, n, as an input and returns an array, fib, that is the Fibonacci Sequence of length n. If you wrote: fib = fibonacci(10); fib would be: [0 1 1 2 3 5 8 13 21 34]; The Fibonacci sequence always starts with 0 and then 1. Every subsequent number is the sum of the previous two numbers. A sequence of length 1 would be: [0] And a sequence of length 2 would be: [0 1] function [fib] = fibonacci(n) end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
