How to combine data of two differnt levels

3 views (last 30 days)
random data is generating for two signals at two levels and separately encoded it. The dimensions of X and Y are 1*100. i want to combine the signals and want to make dimension for two users is 2*1*100. i dont understand how to do it as the data at two levels is different.
N =100;
x = round(rand(1, N));
Y =round(rand(1, N));
dataEnc1 = step(convEncoder,x);
dataEnc2 = step(convEncoder,y);
  2 Comments
TADA
TADA on 12 Apr 2019
what do you get after encoding x/y?
nishika
nishika on 12 Apr 2019
At level-1, i am encoding for user-1. so i get x at level-1 and at level -2, i get y

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 12 Apr 2019
result = [reshape(dataEnc1, 1, 1, []); reshape(dataEnc2, 1, 1, [])]
  3 Comments
Walter Roberson
Walter Roberson on 13 Apr 2019
cat(3, dataEnc1, dataEnc2) %if dataEnc* are row vectors
... probably. But you might need
cat(3, reshape(dataEnc1, 1, []), reshape(dataEnc2, 1, [])) %safest
or
reshape([dataEnc1, dataEnc2], 1, [], 2) %if dataEnc* are column vectors

Sign in to comment.

More Answers (0)

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!