Multiple Linear Regression | MATLAB
Code:-
clc
clear all
close all
x1=[3 5 6 8 12 14];
x2=[16 10 7 4 3 2];
y=[90 72 54 42 30 12];
n=length(x1);
a=[ones(n,1) x1' x2'];
c=pinv(a)*y';
clc
clear all
close all
x1=[3 5 6 8 12 14];
x2=[16 10 7 4 3 2];
y=[90 72 54 42 30 12];
n=length(x1);
a=[ones(n,1) x1' x2'];
c=pinv(a)*y';
No comments