how to divide the random generated data for giving to two encoders at two levels

1 Ansicht (letzte 30 Tage)
Sy=200;
L =2 %% no. of levels
Data_In = round(rand(1,Sy );
i want to provide 100 bits to first encoder at level-1 and 100 bits to second encoder at level- 2nd

Akzeptierte Antwort

Image Analyst
Image Analyst am 6 Mär. 2019
Your data is all 0's or 1's. So do you mean you want to extract all the zeros into one array for the first encoder, and all the ones into a different array for the second encoder?
Data_In1 = Data_In(Data_In == 0); % May not be exactly 100 elements long.
Data_In2 = Data_In(Data_In == 1); % May not be exactly 100 elements long.
Or do you want to extract the first hundred and second hundred values:
Data_In1 = Data_In(1:100);
Data_In2 = Data_In(101:200);

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by