- Programming Projects 1 For This Problem You Will Be Required To Write Three Functions Recursum Recurprod And Fibvec 1 (38.04 KiB) Viewed 31 times
Programming Projects 1. For this problem, you will be required to write three functions: recursum, recurProd, and fibVec
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Programming Projects 1. For this problem, you will be required to write three functions: recursum, recurProd, and fibVec
Programming Projects 1. For this problem, you will be required to write three functions: recursum, recurProd, and fibVector. The first one will take in a vector and compute the sum of the elements of the vector. The second one will take in a vector and compute the product of the elements of the vector. The third one will take in a number, N, and return a vector containing the first n terms of the Fibonacci sequence. You must use recursion to complete these functions. You may not use for loops, while loops or the functions sum, prod, or factorial. Your function headers should be: function ans = recursum(arr) function ans = recurProd (arr) function vec = fibVector (num)