How can i replace a number with its no of ocurrences
Ältere Kommentare anzeigen
i have a matrix=a=[1 0 1 0 1;0 1 1 1 1;1 1 0 1 1;1 1 1 1 1] i want to replace ones by their no of occurences in each row like a=[1 0 2 0 3;0 1 2 3 4;1 2 0 3 4;1 2 3 4 5]
1 Kommentar
Image Analyst
am 28 Mai 2015
Is this your homework?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Scripts finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!