yes of course. Leading solution:
function b = matInc(a)
[b aa] = ndgrid(1:max(a), a);
b(b > aa) = 0;
end
regards,
5753 Solvers
5871 Solvers
Create a cell array out of a struct
530 Solvers
341 Solvers
07 - Common functions and indexing 1
353 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!