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,:);

답변 (1개)

KSSV
KSSV 2021년 6월 1일

0 개 추천

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

ahahah ah
ahahah ah 2021년 6월 1일
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?
Make the indices into an array and extract.
idx = [25 87 149];
data = data(idx, :)

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Data Types에 대해 자세히 알아보기

태그

질문:

2021년 6월 1일

댓글:

2021년 6월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by