フィルターのクリア

How do i reshape the matrix from 2D- 3D?

1 回表示 (過去 30 日間)
NN
NN 2021 年 5 月 25 日
コメント済み: Rik 2021 年 5 月 25 日
I have a matrix 6x1000 double in matlab.How can i convert it to 3D as 6x1000x1 format ?
My input is times series data and i need to give it to sequence input layer for performing convolution.
I have tried
B=reshape(X,6,1000,1);
It didnt give errors, but B appeared same as 6 x 1000 double.
Input size of sequence input layer is given as 6 x 1000 x1.
and without reshaping/converting i am getting the below error while executing.
Invalid training data. Sequence responses must have the same sequence length as the
corresponding predictors.
  6 件のコメント
Stephen23
Stephen23 2021 年 5 月 25 日
編集済み: Stephen23 2021 年 5 月 25 日
"I have a matrix 6x1000 double in matlab.How can i convert it to 3D as 6x1000x1 format ?"
They are already exactly the same arrays:
"Arrays in MATLAB are N-dimensional, with an infinite number of trailing singleton dimensions."
The infinite trailing singleton dimensions might not be displayed, but implicitly they are always there. See also:
Rik
Rik 2021 年 5 月 25 日
The error message spoke of two things: response and predictor. You only mention one size.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by