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

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] the function will produce Your Function save ResetMATLAB Documentation 1 function loutput_argsl demo) 2 rowArray=[1:10] ; 3 oddvalues-rowArray (mod (rowArray, 2)~=0); disp("odd values are:"); 5 disp (oddvalues); 6 end Code to call your function C Reset 1 inputRowArray [1:10] 2 removeEvens( inputRowArray
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
