필터 지우기
필터 지우기

How can i extract and store colums from my data

조회 수: 1 (최근 30일)
Manu Mensa
Manu Mensa 2019년 5월 21일
댓글: Manu Mensa 2019년 5월 22일
Hi, all. In my data above, column 1 is a unique identifer, colums 2 and 3 are Vx and Vy, column 4 is elevation and column five is time. I need help extracting Vx and Vy that correspond to unique elements of time in the attached data and store the corresponding results in an array or matrix. Any help will be appreciated. Thanks.

채택된 답변

KSSV
KSSV 2019년 5월 21일
data = importdata('data.txt') ;
id = data(:,1) ;
[c,ia,ib] = unique(id) ;
N = length(c) ;
iwant = cell(N,1) ;
for i = 1:N
iwant{i} = data(ib==i,:) ;
end

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by