yes of course. Leading solution:
function b = matInc(a)
[b aa] = ndgrid(1:max(a), a);
b(b > aa) = 0;
end
regards,
Number of 1s in the Binary Representation of a Number
359 Solvers
Arrange Vector in descending order
4257 Solvers
Who has power to do everything in this world?
321 Solvers
261 Solvers
327 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!