regression polynomial fit with any order and function
Afficher commentaires plus anciens
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 commentaire
John D'Errico
le 13 Avr 2018
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.
Réponses (0)
Catégories
En savoir plus sur Polynomials dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!