the way find the specific data select

1 vue (au cours des 30 derniers jours)
ahahah ah
ahahah ah le 1 Juin 2021
Commenté : KSSV le 1 Juin 2021
i have a data sheet and just want specific data
and the data number is arithmetic sequenc
how can i select?
this is my code
data=load('aa.txt');
i=25
for
i=i+62
end
A=data(i,:);

Réponses (1)

KSSV
KSSV le 1 Juin 2021
Read about MATLAB indexing an array. If you want data from 25 to 100, just use:
iwant = data(25:100,:) ;
If you are looking to pick on some criteria, read about inequalitites. You can get indices using >, <, ==
  2 commentaires
ahahah ah
ahahah ah le 1 Juin 2021
thanks you for answering but i want specific data not contiunous. like No.25 and No.87 and No.149 and so on,,, do i make a zeros array and insert?
KSSV
KSSV le 1 Juin 2021
Make the indices into an array and extract.
idx = [25 87 149];
data = data(idx, :)

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by