Create a 1x1 cell element but with a vector of n length

4 次查看(过去 30 天)
So I've been getting this error
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is
1-by-29.
Seems that the sizing is off... but I want the 1 by 29 to be be just a 1 by 1 but with all 29 included....
I'm creating these rows for input into a NARX.
See the example from matlab documentation on multiple external variables....
Multiple External Variables
The maglev example showed how to model a time series with a single external input value over time. But the NARX network will work for problems with multiple external input elements and predict series with multiple elements. In these cases, the input and target consist of row cell arrays representing time, but with each cell element being an N-by-1 vector for the N elements of the input or target signal.
For example, here is a dataset which consists of 2-element external variables predicting a 1-element series.
[X,T] = ph_dataset;
The external inputs X are formatted as a row cell array of 2-element vectors, with each vector representing acid and base solution flow. The targets represent the resulting pH of the solution over time.
That underlined thing is what I want to do with with n-element vectors...
  2 个评论
KALYAN ACHARJYA
KALYAN ACHARJYA 2019-7-1
[X,T] = ph_dataset;
here X and T are outputs, can you elaborate with simple example?
Isaac Lau
Isaac Lau 2019-7-1
编辑:Isaac Lau 2019-7-1
X looks like (345,34)....
All of X fits in a single column yet it has a vector of 1 by 2.... how can i do this.... or am i mistaken.....
The matlab example lives here at the very bottom of this page

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Electrical Block Libraries 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by