1. Engineering
  2. Computer Science
  3. create a script that receives any row matrix with positive...

Question: create a script that receives any row matrix with positive...

Question details

Create a script that receives any row matrix with positive integer elements as the input (suppose you have at least two elements in your matrix), and creates the output as a row matrix with only two elements, where the first element will be sum of all the oddly placed element of the input, and the second value will represent the sum of all the evenly placed elements of the input: Example: A = [11 , 4 , 42 , 31 , 1] B=output = [54 , 35]

by matlab funtions

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution