How to index a cell with two columns?

11 Ansichten (letzte 30 Tage)
Lei am 30 Apr. 2012
Hello, everyone. I have a cell which looks like this:
775.446000000000 774.706000000000
774.706000000000 773.246000000000
773.246000000000 772.906000000000
772.906000000000 770.906000000000
770.906000000000 770.116000000000
Is there a way to extract data or index from this cell to get a result like the below one?
Basically,I want get all of the data from the first column and last one from second column since the other data are repeated which are useless for me. Anybody would like to help me out...thanks a lot!

Akzeptierte Antwort

Richard Brown
Richard Brown am 30 Apr. 2012
[data(:, 1); data(end,2)]
  3 Kommentare
Lei am 1 Mai 2012
yeah,that make sense.I know how to index cell arrays,I just never used the 'end' before and did not think to put them in a single matrix. Thanks again for your help! This really helps me!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)


Mehr zu Matrix Indexing 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