필터 지우기
필터 지우기

Extract information based on specific condition

조회 수: 2 (최근 30일)
Nazrin Afiq Abdul Rahman
Nazrin Afiq Abdul Rahman 2021년 3월 8일
편집: Nazrin Afiq Abdul Rahman 2021년 3월 8일
Hello,
Can someone help me about my script? This is the example of my script:
% Sorting for network of residual.
% Residual with the same frequency, epoch and pair of satellite will be use.
clear all;
clc;
isk1_isk3=importdata('ISK1_ISK3.txt');
isk1_isk5=importdata('ISK1-ISK5.txt');
count=0;
isk13_res=[];
isk15_res=[];
for i=1:length(isk1_isk3);
res13=[];
for j=1:length(isk1_isk5);
res15=[];
if isk1_isk3(i,2)==isk1_isk5(j,2)&&isk1_isk3(i,4)==isk1_isk5(j,4)&&isk1_isk3(i,5)==isk1_isk5(j,5);
fprintf('Residual information extracted for ISK1_ISK3 & ISK1_ISK5');
count_i=count+i;
count_j=count+j;
res13=[res13;isk1_isk3(i,6)];
res15=[res15;isk1_isk5(j,6)];
isk13_res=[isk13_res;count_i,count_j,res13];
isk15_res=[isk15_res;count_i,count_j,res15];
end
end
end
This is the scenario about the aim of my script:
I have two text file which is call isk1_isk3.txt and isk1_isk5.txt. Both file had the same number of column which is 6 and different number of rows. What i want to do actually is to extract information of column 6 from both isk1_isk3.txt and isk1_isk5.txt file with the condition where column 2, column 4 and column 5 are the same. The problem is the code takes too long to extract the information. What i already showed is a one day file for both and i actually have 2 years of file which is 365X2 number of file. Secondly, i dunno wether the result true or not since it takes too long to process. Can someone help me about this script? or maybe show me some script with better idea and view.
Thanks :)

답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by