필터 지우기
필터 지우기

splitting large data set using if function

조회 수: 1 (최근 30일)
pillowheaded
pillowheaded 2019년 1월 22일
댓글: jahanzaib ahmad 2019년 1월 22일
Hi all!
i have some very large data sets which is 4 coloumns i need to seperate the data out into individual sets. The 3rd coloumn is a repeating set and i want to split the data based upon when it resets so i now have each group of data seperated for example
coloumn 1 coloumn 2 coloumn 3 coloumn 4
1 52 1 47
17 28 2 84
24 34 1 12
i want the data so it would now be
data set 1 = 1 52 1 47 data set 2 = 24 34 1 12
17 28 2 84
sorry i have written this so poorly, any help would be much appreciated!

답변 (1개)

jahanzaib ahmad
jahanzaib ahmad 2019년 1월 22일
편집: jahanzaib ahmad 2019년 1월 22일
if B is your data then C has all the sets in cell array
C={};
B=rand(10,4);
for k = 1 : length(B)
Ck =B(k,:);
C{k}=Ck;
end
  댓글 수: 1
jahanzaib ahmad
jahanzaib ahmad 2019년 1월 22일
because u said its very large data i m not sure how much time it will take to make sets for each row

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

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by