Question: USING MATLB PLEASE SHOW commands and output. QUESTION 1. Create a function sumcomp that compares the sum of all the odd-indexed elements with the sum
USING MATLB
PLEASE SHOW commands and output.
QUESTION 1. Create a function sumcomp that compares the sum of all the odd-indexed elements with the sum of all the even-indexed elements and returns:
0, if they are equal,
1, if the sum of the odd-indexed elements is greater,
2, if the sum of the even-indexed elements is greater
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
