How can I delete multiple elements from an array?

6 Ansichten (letzte 30 Tage)
Henry Kricancic
Henry Kricancic am 26 Mai 2015
Kommentiert: Star Strider am 27 Mai 2015
Hi all,
Say I have an array that's really large, say, 1000 x 1000, and I want to look only at the 10th element of each row, and the 10th element of each column, which would produce a 100 x 100 array. How can I do this?
Cheers, Henry

Akzeptierte Antwort

Star Strider
Star Strider am 26 Mai 2015
This works:
A10 = A([1 10:10:end], [1 10:10:end]);
with ‘A’ being your (1000x1000) array.
  4 Kommentare
Henry Kricancic
Henry Kricancic am 26 Mai 2015

Wow, you bloody beauty mate - thank you! Exactly what I needed :)

Star Strider
Star Strider am 27 Mai 2015
My pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by