yes of course. Leading solution:
function b = matInc(a)
[b aa] = ndgrid(1:max(a), a);
b(b > aa) = 0;
end
regards,
273 Solvers
Find the "ordinary" or Euclidean distance between A and Z
140 Solvers
Back to basics 19 - character types
226 Solvers
471 Solvers
525 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!