Question: Please use Matlab, please. Create a function that performs the following tasks. Create an array that includes the first N integers. N will be an
Please use Matlab, please.

Create a function that performs the following tasks. Create an array that includes the first N integers. N will be an input parameter. Create an array with the primes from 0 to N using the function primes(n). By comparing the two arrays, changes on your original array the values of the prime numbers by 0. You can not use a build in Matlab function for the comparison process. Return the sum of the resulting array. Example: o N = 11. O Array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] o Primes = [1, 2, 3, 5, 7, 11] o New_array = [0,0,0,4,0,6,0,8,9,10,0] 0 Result_sum = 37
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
