How to swapping values in matrix row ?

2 vues (au cours des 30 derniers jours)
Sajith Galgamuwa
Sajith Galgamuwa le 20 Avr 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

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by