function [correlations,regression_coeff,normed_regression_coeff, ...
    property_angles,axes_deviated,properties_deviated,predicted_properties] ...
    = property_fit_revised(axes,properties)

[n,numdim] = size(axes);

[n,numprop] = size(properties);

meanprop = mean(properties);

meanaxes = mean(axes);

for i = 1:n
    
    for j = 1:numprop
        
        properties_deviated(i,j) = properties(i,j) - meanprop(j);
        
    end
    
    for j = 1:numdim
        
        axes_deviated(i,j) = axes(i,j) - meanaxes(j);
        
    end
    
end

for i = 1:14
    
    objectlabels{i,1} = int2str(i);
end

regression_coeff = (inv((axes_deviated')*axes_deviated))*((axes_deviated')*properties_deviated);

predicted_properties = axes_deviated*regression_coeff;

correlations = corrcoef([axes_deviated,properties_deviated,predicted_properties]);

sum_squared_coeff = sum(regression_coeff.*regression_coeff);


for i = 1:numdim
    for j = 1:numprop
        normed_regression_coeff(i,j) = regression_coeff(i,j)/sqrt(sum_squared_coeff(j));
    end
end

property_angles = acosd(normed_regression_coeff);



plot(axes_deviated(:,1),axes_deviated(:,2),'ko')

axis equal

hold on

text(axes_deviated(:,1),axes_deviated(:,2),objectlabels,'fontsize',10,'verticalalignment','bottom')

hold on

plot_regression_coeff = regression_coeff';

plot(plot_regression_coeff(:,1),plot_regression_coeff(:,2),'rx')

hold on

origin = [0,0];

plot(origin(:,1),origin(:,2),'b+')