How to swapping values in matrix row ?

2 visualizzazioni (ultimi 30 giorni)
given matrix eg:-
1 6 6 8
9 5 7 2
it should be chang as
1 6 6 8
2 7 5 9

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Images in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by