필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
Geetha shastry
Geetha shastry 2020년 5월 27일
댓글: KSSV 2020년 5월 27일
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
KSSV
KSSV 2020년 5월 27일
Check the dimensions of x, y ..they should be equal.

댓글을 달려면 로그인하십시오.

답변 (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