Linear regression
clear;
clc;
data = xlsread('C:\Users\PGDM Test\Downloads\Gold_data.xlsx');
len = length(data(:,1));
nifty = data(2:len,1);
gold = data(1:len-1,2);
scatter(gold,nifty);
xlabel('gold');
ylabel('nifty');
title('scatter plot');
lsline
result = regstats(nifty,gold,'linear');