** Please see the attached file for the complete problem description **
Please prepare a simple and basic MATLAB code for the 2 attached problems. M-file and word documents with comments will help me understand the codes better.
3) Write a recursive function computing the sum of cubes of all integers between 1 and N.
4) Write a MATLAB function 'reflect_my' performing symmetrical reflection of an array. In other words for the initial array 1 2 5 7 9, a symmetrical reflection should give 9 7 5 2 1.
(i) Write a MATLAB code based on a recursive algorithm
(ii)Write a MATLAB code based on a non-recursive algorithm© BrainMass Inc. brainmass.com October 10, 2019, 4:34 am ad1c9bdddf
** Please see the attached files for the complete solution **
The solution is included in the attached .m files.
Thank you for using BrainMass.com. I hope that this solution helps you with your assignment.
function sum = recur(begin,last)
if begin == last
sum = ...
In this solution we show how to write a MATLAB code based on a number of different given criteria.