yes of course. Leading solution:
function b = matInc(a)
[b aa] = ndgrid(1:max(a), a);
b(b > aa) = 0;
end
regards,
312 Solvers
202 Solvers
380 Solvers
432 Solvers
2099 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!