フィルターのクリア

How can I convert more column vector into cell array

4 ビュー (過去 30 日間)
Roland
Roland 2014 年 2 月 6 日
コメント済み: Roland 2014 年 2 月 6 日
Hi
I want to use my imported data for NARX model. Because I want to train my network with two or more vsriables, I have to have a cell array format like this [8,875836;1] [11,025640;1] [9,46135;1] My question is how can I convert more variables to this format?
Thanks, Roland

採用された回答

Fran Mat
Fran Mat 2014 年 2 月 6 日
編集済み: Fran Mat 2014 年 2 月 6 日
Hi Roland:
It's me again...
x = reshape(1:10,2,5);
y = num2cell(x,[1 5]);
enjoy !.
Best regards.
  1 件のコメント
Roland
Roland 2014 年 2 月 6 日
It works:) I really appreciate your help!
Best regards.

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

その他の回答 (1 件)

Wayne King
Wayne King 2014 年 2 月 6 日
編集済み: Wayne King 2014 年 2 月 6 日
Maybe you need to be more precise
x = randn(1000,1);
x = {x};
Or let's assume you have the column vectors in a matrix
x = randn(1000,10);
x = mat2cell(x,1000,ones(10,1));
The above will put the ten column vectors into a 1x10 cell array.
  1 件のコメント
Roland
Roland 2014 年 2 月 6 日
I tried, but it doesn't work the way I want to. I need for example a 1x1000 cell array of 2x1 matrices which represent dynamic data --> 1000 timesteps of 2 variable, like in the image

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

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by