Concatinate 4D Time-Signals

Hi,
How can i concatinate 20 , 4D signals
I1 = rand(32,32,1,13) ;
I2 = rand(40,32,1,13) ;
...
I20 = rand(47,32,1,13) ;
Catq1=cat(4,I1,I2);
The above give me error? What can i do?

 採用された回答

Ridwan Alam
Ridwan Alam 2019 年 12 月 12 日
編集済み: Ridwan Alam 2019 年 12 月 12 日

0 投票

You want to concatenate on the dim which is not same for both, right?
Catq1 = cat(1,I1,I2);
% OR
Catq1 = [I1;I2];

4 件のコメント

ARN
ARN 2019 年 12 月 13 日
編集済み: ARN 2019 年 12 月 13 日
Can you tell me if i am on the right track? So i am extracting data from lets video and i get 3-D data (512 points, 4 channels, 320 timeseries) for 200+ cycles and likewise i am getting for next 20 files.
what i am trying to do is concatinate all the timeseries which will become 320*200*20 and each time-sample i have 520 points on all 4 channels.
ldm= length(data);
[Ns, Nch, Rs] = size(data(1).FL.TimeSignals);
a=zeros(ldm,Ns,Nch,Rs);
for i=1: ldm
a(i,:,:,:)=data(i).FL.TimeSignals, Ns, Nch, Rs;
end
I1=a(:,:,1,:);
a size will be (200, 512,4, 320 ). Now same procedure for all 20 videos and then concatinate it like you proposed?
Ridwan Alam
Ridwan Alam 2019 年 12 月 13 日
well .. without looking at the 'data', it's a bit of a guess .. but looks fine to me, except a few questions. the rehsape() inside the loop is not really doing anything, right? because all data(i).FL.TimeSignals have size [Ns, Nch, Rs]. Now, what are you trying to do with this line: I1=a(:,:,1,:); this will make I1 of size [ldm,Ns,Rs].
ARN
ARN 2019 年 12 月 13 日
No, reshape is not there.. i wrote it wrong. Thanks for the reply
Ridwan Alam
Ridwan Alam 2019 年 12 月 13 日
Sure. Glad to help!

サインインしてコメントする。

その他の回答 (1 件)

Bartlomiej Mroczek
Bartlomiej Mroczek 2023 年 3 月 26 日

0 投票

And how to provide the CNN: predict DL block to the ready machine.
1. I have data built in 4D format, my CNN machine only use this format for learning and prediction in matlab.
2. I have built a model in SIMULINK but there is a problem with entering data to the Predict block, error message:
Available formats are double non-complex matrix, a structure with or without time, or a structure with MATLAB timeseries as leaf nodes. All formats require the data to be finite (not Inf or NaN).
How to solve it?

カテゴリ

製品

リリース

R2018b

質問済み:

ARN
2019 年 12 月 12 日

回答済み:

2023 年 3 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by