Question: Using matlab? No Negatives Write a function called genMatNone that takes an amatay of integers called in Mat and creates an ouput array that replaces

No Negatives Write a function called genMatNone that takes an amatay of integers called in Mat and creates an ouput array that replaces all the nigdyve numbers in in Mat with zero Restriction Logic Indexing should be used. Loops should not be used, Ex innat 4 5 3 2 2: 1: 53 Inmat produces cutat 5 2 1 Function A Save OR MATLAB Documentation Function Savo e Reset MATLAB Documentation 1 function (outrat) - genMatNoneginmat) 2 X Replace all the negative numbers in 20 array with zero. outMatinat; 4% Create a logical array with trues where entries are negative identifytoppositions. % complete the code 6 x Use logical indexing to set all the negative values to * Insert rest of code here Code to call your function e Reser Inmat-11.-2. 3; -4, 5, -6, 7, 8, 91 1 outrat - ritatis rat Run Function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
