segregate data

조회 수: 14 (최근 30일)
Kugen Raj
Kugen Raj 2012년 3월 7일
P =
Columns 1 through 12
14 15 16 17 18 19 20 21 22 23 24 25
Columns 13 through 24
86 87 88 89 273 274 275 276 337 338 339 340
Columns 25 through 32
341 342 343 344 345 346 347 348
I want segregate this data into two group.(14-89) into one group and (273-348) into another group.
  댓글 수: 1
Kugen Raj
Kugen Raj 2012년 3월 7일
actually, i can do this using vector method. but, the problem is that i will have different number of data for each loop and im calculating this P value for 100 times. so, is there any alternative way to do this? thanks

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

채택된 답변

Andrei Bobrov
Andrei Bobrov 2012년 3월 7일
out = reshape(P,numel(P)/2,[])'
or
out = mat2cell(P,1,numel(P)/2*[1 1])
or
t = P < 100;
out = {P(t) P(~t)}
  댓글 수: 3
Kugen Raj
Kugen Raj 2012년 3월 7일
I have a question on this code:
t = P < 100; this line is to find all the P values below 100 right?
Andrei Bobrov
Andrei Bobrov 2012년 3월 7일
yes

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by