It would be beneficial for the problem if zeros were added to test cases, for example [...,1,2,0,-1,-2,...], [...,1,2,3,0,2,3,...], [...1,2,3,0,0,0,1,2,...], [...,1,2,0,0,-1,-2,...], etc.
Additional test cases have been added and the description slightly modified.
Find all elements less than 0 or greater than 10 and replace them with NaN
13069 Solvers
Return unique values without sorting
591 Solvers
Get the elements of diagonal and antidiagonal for any m-by-n matrix
269 Solvers
464 Solvers
260 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!