yes of course. Leading solution:
function b = matInc(a)
[b aa] = ndgrid(1:max(a), a);
b(b > aa) = 0;
end
regards,
151 Solvers
Find the largest value in the 3D matrix
1064 Solvers
Simple date to serial no. conversion
113 Solvers
380 Solvers
525 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!