clssification of a data series according to its numbers

조회 수: 1 (최근 30일)
som
som 2013년 4월 13일
Hi all,
I have some cells like "a" whose lenght decrease each step like below:
a{1}=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]';
a{2}=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]';
a{3}=[1 2 3 4 5 6 7 8 9 10 11 12 13 14]';
a{4}=[1 2 3 4 5 6 7 8 9 10 11 12 13]';
I wanto to classify the elements of a{1} , a{2}, a{3} and a{4} to "b", "c" , "d" and "e" cells, respectively. The dominant idea for classification is the elements of "b", "c" , "d" and "e" must be a ratio of 4 as possible. The desired outputes must be in the following way:
b{1}=a{1}(1:4,1); b{2}=a{1}(5:8,1); b{3}=a{1}(9:12,1); b{4}=a{1}(13:16,1);
c{1}=a{2}(1:4,1); c{2}=a{2}(5:8,1); c{3}=a{2}(9:12,1); c{4}=a{2}(13:15,1);
d{1}=a{3}(1:4,1); d{2}=a{3}(5:8,1); d{3}=a{3}(9:11,1); d{4}=a{3}(12:14,1);
e{1}=a{4}(1:4,1); e{2}=a{4}(5:7,1); e{3}=a{4}(8:10,1); e{4}=a{4}(11:13,1);
I have written a single program for a bove question but it's too complicated.
How can I write this program as short as possible? Thanks in advance.

답변 (0개)

카테고리

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