How to flip values greater than zero in a row
Ältere Kommentare anzeigen
If I have a row in matrix like that
0 0 0 0 1 2 3 0 0 0
I want to make it like that
0 0 0 0 0 0 3 2 1 0
If it is possible to do?
1 Kommentar
Stephen23
am 16 Apr. 2018
@Tanmoyee Bhattacharya: the numbers a not only flipped L-R, but have been translated too. How is the new position determined?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu MATLAB 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!