how to send the polyfit with different dimension of X and Y ?

2 次查看(过去 30 天)
HELLO,
I am xTrain as cell array with [1 , 8614] and yTrain also Cell array[ 1, 4612]
Converting these to arrays with
X_poly = cell2mat(xTrain);
y_poly = cell2mat(yTrain);
passing these parameters to polyfit function
[X_polynominal, mu, info]=polyfit(X_poly,y_poly,p);
Getting an error of
X and Y vectors must be the same size.
please help in how to resolve these issue or my question is we cannot pass the different dimesnion of X and Y to polyfit?
Thanks for the answers
Geetha.S
  3 个评论
Geetha shastry
Geetha shastry 2020-5-27
hi ,
thanks for the immediate reply
actually am using Xtrain
like this
xTrain = con2seq([...
(3v3Red(idxStart:end)');
(Bldc1_I1(idxStart:end)');
(Bldc1_I2(idxStart:end)');
(Data_0__Speed(idxStart:end)');
]);
yTrain = con2seq([...
Oil_Flow(idxStart:end)')
]);
and p = 2;
then , is there any other way we can pass these different arrays
Thank you

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by