regression polynomial fit with any order and function
이전 댓글 표시
i have a function that can solve matrix with polynomial regression (fit with any function and order)
function [A] = betha_regpol(x,y,d)
%solving matrix using polynomial regression
%x and y are data
%d is order
k = length(x);
l = length(y);
%xt = ones(size(x));
c = zeros(d+1);
b = zeros(d+1,1);
dt2 = 0;
d2 = 0;
if k~=1
is it correct or not? and please explain why do i use zeros function thankyou
댓글 수: 1
John D'Errico
2018년 4월 13일
Please learn to format your code so it is readable. I did that here. Read this:
https://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup#answer_18099
Is your code correct? No. There is no attempt at a regression at all in that code.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Polynomials에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!