yes of course. Leading solution:
function b = matInc(a)
[b aa] = ndgrid(1:max(a), a);
b(b > aa) = 0;
end
regards,
It dseon't mettar waht oedrr the lrettes in a wrod are.
652 Solvers
232 Solvers
546 Solvers
find the maximum element of the matrix
348 Solvers
Add a row of zeros on top of a matrix
193 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!