Matlab Question: Write a function removeEvens to remove all the even numbers fro
ID: 3587644 • Letter: M
Question
Matlab Question: Write a function removeEvens to remove all the even numbers from input row array inRowArray which contains integer numbers. The function removeEvens should use the mod internal function and operate on a row array of any length. Hint: Use logical indexing and the double square brackets []. Restriction: Do not use loops. For example:
inputRowArray = [1,2,3,4,5]
will produce 1 3 5
!Restrictions!
Is the correct result calculated for row array of random integers?
Is the mod function used?
Check that a loop is not used.
Your Function Save C Reset MATLAB Documentation 1 function [ output-args ] = untitled ( input-a rgs ) 2%UNTITLED Summary of this function goes here 3% Detailed explanation goes here 4 6 end Code to call your function C Reset 1 inputRowArray [1:10] 2removeEvens ( inputRowArray) Run FunctionExplanation / Answer
OUTPUT:
1 2 3 4 5 6 7 8 9 10
1 3 5 7 9