Question: 3.) (35 Points) Assume the vector AM contains an even number of elements. Develop a MATLAB script that asks the user for the vector AM

 3.) (35 Points) Assume the vector AM contains an even number

3.) (35 Points) Assume the vector AM contains an even number of elements. Develop a MATLAB script that asks the user for the vector AM and once the vector is found to contain an even number of elements, div?de the product of its even elements by the sum of its odd elements without using the MATLAB functions prod or sum. Store the result in a variable called PDS. If AM is found to contain an odd number of elements, display an error message and prompt the user again for a vector with an even number of elements

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!