How to swapping values in matrix row ?

2 Ansichten (letzte 30 Tage)
Sajith Galgamuwa
Sajith Galgamuwa am 20 Apr. 2016
Kommentiert: Sajith Galgamuwa am 20 Apr. 2016
given matrix eg:-
1 6 6 8
9 5 7 2
it should be chang as
1 6 6 8
2 7 5 9

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 20 Apr. 2016
a=[1 6 6 8
9 5 7 2];
a(2,:) = fliplr(a(2,:));

Weitere Antworten (0)

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by