Question
DATASET y x1 x2 x3 x4 x5 x6 60323 83.0 234289 2356 1590 107608 1947 61122...
DATASET
y x1 x2 x3 x4 x5 x6 60323 83.0 234289 2356 1590 107608 1947 61122 88.5 259426 2325 1456 108632 1948 60171 88.2 258054 3682 1616 109773 1949 61187 89.5 284599 3351 1650 110929 1950 63221 96.2 328975 2099 3099 112075 1951 63639 98.1 346999 1932 3594 113270 1952 64989 99.0 365385 1870 3547 115094 1953 63761 100.0 363112 3578 3350 116219 1954 66019 101.2 397469 2904 3048 117388 1955 67857 104.6 419180 2822 2857 118734 1956 68169 108.4 442769 2936 2798 120445 1957 66513 110.8 444546 4681 2637 121950 1958 68655 112.6 482704 3813 2552 123366 1959 69564 114.2 502601 3931 2514 125368 1960 69331 115.7 518173 4806 2572 127852 1961 70551 116.9 554894 4007 2827 130081 1962
Answers
`Hey,
Note: If you have any queries related to the answer please do comment. I would be very happy to resolve all your queries.
clc
clear all
close all
A=[60323 83.0 234289 2356 1590 107608 1947
61122 88.5 259426 2325 1456 108632 1948
60171 88.2 258054 3682 1616 109773 1949
61187 89.5 284599 3351 1650 110929 1950
63221 96.2 328975 2099 3099 112075 1951
63639 98.1 346999 1932 3594 113270 1952
64989 99.0 365385 1870 3547 115094 1953
63761 100.0 363112 3578 3350 116219 1954
66019 101.2 397469 2904 3048 117388 1955
67857 104.6 419180 2822 2857 118734 1956
68169 108.4 442769 2936 2798 120445 1957
66513 110.8 444546 4681 2637 121950 1958
68655 112.6 482704 3813 2552 123366 1959
69564 114.2 502601 3931 2514 125368 1960
69331 115.7 518173 4806 2572 127852 1961
70551 116.9 554894 4007 2827 130081 1962];
y=A(:,1);
L=[ones(size(A,1)),A(:,2:7)];
R=y(:);
disp('Coefficients are')
beta=L\R
err=abs(y-L*beta);
errorbar(y,err)
y=y-mean(y);
y=y/std(y);
figure;
hold on;
for i=2:7
x=A(:,i);
x=x-mean(x);
x=x/std(x);
plot(x,y);
end
legend('x1 vs y','x2 vs y','x3 vs y','x4 vs y','x5 vs y','x6 vs y')
Kindly revert for any queries
Thanks.
MATLAB R2020a - academic use HOME FA Search Documentation Prad OOO Figure 1 File Edit View Insert Insert Tools Desktop Window Help Figure 2 Tools Desktop Window Help File Edit View Insert Hew Ope un an dvand x 104 72 1.5 7 AB/si e x1 vs y x2 vs y x3 vs y x4 vs y x5 vs y x6 vs y E 1 6.8 Current Nam scral scral scra scra scral seas seca 0.5 Value 16x7 double 22x1 double 16x1 double 7 16x22 double 16x1 double 16x1 double 16x1 double 6.6 0 seca -0.5 62 -1 6 2 4 6 8 10 12 14 16 -1.5 -2 -1.5 -1 -0.5 0 0.5 1.5 2 Seca 6.4 seca seco selec selec selec serie shift shin shoc side_len.m sieve.m Simp.m simple_gui2.m simple_gui2.prj simps.m simpson_comp.m SimpsonComp.m SimpsonComp.prj simpsons.m Simp ThreeEight.m sine_series.m sinhRec.m sinN.m sinoperations.m crap_cse.prj (Document) X 1圈圈圈圈圈圈圈圈圈圈 34 x=x/std(x); 35 - plot(x,y); 36 - end 37 - legend('x1 vs y','x2 vs y','x3 vs y','x4 vs y','x5 vs y', 'x6 vs y') Command Window New to MATLAB? See resources for Getting Started. 0.000015061872271 -0.000000035819179 -0.000002020229804 -0.000001033226867 -0.000000051104106 0.001829151464613 fx >>