replace one Listbox cell with another

1 Ansicht (letzte 30 Tage)
Vincent I
Vincent I am 18 Jun. 2012
i would like to replace one line or cell with another.
eg I have 10 cells and I would like to replace cell #2 with cell #7 and vice versa
temp= Cell2
Cell2=Cell7
Cell7=temp
I tried everything and the only way i can move a selected cell is to the top on the listbox. Thank you

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 18 Jun. 2012
A - your cell array with size (10 x 1)
A([2,7]) = A([7,2]);
  1 Kommentar
Vincent I
Vincent I am 18 Jun. 2012
damn haha that easy.. thank you it worked

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps 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