MATLAB: How to calculate Correlation coefficient ‘R’ value smae as displayed in the regression plot using Neural networks

correlation coefficent

Hi there, would anybody like to explain me how to calculate the same "R" value as displayed in grapgh kindly see attachment.

Best Answer

Read about functions regression and corr2
th = linspace(0,2*pi) ;
x1 = sin(th) ;
x2 = sin(th)+rand(size(th)) ;
plotregression(x1,x2)
% Method 1
regression(x1,x2)
% MEthod 2
corr2(x1,x2)
Related Question