Question: This is Matlab, Cant use any loops here, just row indexing and relating arrays No Negatives Write a function genMatNoNeg that take a nx m

This is Matlab, Cant use any loops here, just row indexing and relating arraysThis is Matlab, Cant use any loops here, just row indexing and

No Negatives Write a function genMatNoNeg that take a nx m array inMat of integers and create a X ouput array that replaces all the negative numbers in inMat with zero. Hint: Use logic indexing and the internal function randi. Restriction: You may not use loops. For example: inMat 4 4 5 2; 3 4 5] genMatNoNeg( inMat) produces outMat 4 Your Function Save C Reset | MATLAB Documentation 1 function [out-lat] genMatNoNeg( inMat) = 3 % Your solution goes here % 5 end Code to call your function C Reset 1 inMat-rand (10,3,3); 2outMatgenMatNoNeg( inMat)

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