How to combine data of two differnt levels

1 Ansicht (letzte 30 Tage)
nishika
nishika am 12 Apr. 2019
Kommentiert: rayna kumari am 13 Apr. 2019
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 Kommentare
TADA
TADA am 12 Apr. 2019
what do you get after encoding x/y?
nishika
nishika am 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

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 12 Apr. 2019
result = [reshape(dataEnc1, 1, 1, []); reshape(dataEnc2, 1, 1, [])]
  3 Kommentare
Walter Roberson
Walter Roberson am 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
rayna kumari
rayna kumari am 13 Apr. 2019
Thanks, it really helped

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by