Effacer les filtres
Effacer les filtres

how can i exclude rows from a matrix

27 vues (au cours des 30 derniers jours)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD le 20 Oct 2017
Dear Guys, I have a question that will help me a lot in my research. lets say I have a matrix of 3000*2 dimensions. the first 2900 rows are number 02 repeated in each row. the last 100 rows carry number 01. I do not need this number one rows. How can i tell MATLAB to read just the first 2900 or to exclude the outliers such as number 01 here? thank you guys
  2 commentaires
Andrei Bobrov
Andrei Bobrov le 20 Oct 2017
Please attach smal part your data here as mat-file.
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD le 20 Oct 2017
Here is a sample of the matrix, i need matlab to read just the similar number which is here number 2, and to delete the number 1 cells
thank you

Connectez-vous pour commenter.

Réponse acceptée

Cyrus Rezvanifar
Cyrus Rezvanifar le 20 Oct 2017
Modifié(e) : Cyrus Rezvanifar le 20 Oct 2017
Simply try the two lines of code below, and it would remove the 1's elements from your data:
Data=str2num(Month_of_Data);
Data(2785:end)=[]
Let me know if this is what you needed to do
  2 commentaires
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD le 20 Oct 2017
it worked thank you Mr Sayed very much
Cyrus Rezvanifar
Cyrus Rezvanifar le 20 Oct 2017
You're welcome, glad it worked

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Cell Arrays 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