Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to extract numbers with its corresponding numbers in the next column from a file?

조회 수: 1 (최근 30일)
Pearl Lan
Pearl Lan 2019년 10월 8일
마감: MATLAB Answer Bot 2021년 8월 20일
%Start
%Remove the values that are greater than 1000 and the corresponding times
UD=load('APP_C20_1_Press_Unfiltered.txt');
Unfiltered_Data=UD(:,2);
for k=1:length(Unfiltered_Data)
if Unfiltered_Data(k)>1000
Filtering_Data=Unfiltered_Data(Unfiltered_Data>1000);
end
end
I've figured how to extract the numbers greater than 1000 but I can't figure out how to extract its corresponding times, I don't even know where to begin, thank you so much for your help.

답변 (1개)

Fabio Freschi
Fabio Freschi 2019년 10월 8일
Does this solve your question?
% complete data
UD = load('APP_C20_1_Press_Unfiltered.txt');
DataGreaterThan1000 = UD(UD(:,2) > 1000,:);
DataLowerThan1000 = UD(UD(:,2) <= 1000,:);

Community Treasure Hunt

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

Start Hunting!

Translated by