Question: No Negatives Write a function called genMatNoNeg that takes an array of integers called inMat and creates an ouput array that replaces all the negative
No Negatives
Write a function called genMatNoNeg that takes an array of integers called inMat and creates an ouput array that replaces all the negative numbers in inMat with zero.
Restrictions: Logic indexing should be used. Loops should not be used.
Ex:
inMat
;
;
genMatNoNeg inMat
produces
outMat
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
