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 =[
45-2;
521;
-3-45]
genMatNoNeg( inMat )
produces
outMat =
450
521
005
No Negatives Write a function called genMatNoNeg

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 Programming Questions!