⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 corrplot.m

📁 人工神经网络:MATLAB源程序用于训练测试
💻 M
字号:
%# function r = corrplot(y,yhat,plotindex)						
%#											
%# AIM:		Calculates linear correlation coefficient between two vectors and	
%#		displays correlation plot.						
%# 											
%# INPUT:	y : first n-element vector (e.g. vector of experimental responses)	
%#		yhat : second n-element vector (e.g. vector of predicted responses)	
%#		       the vector must have the same dimentions as y.			
%#		plotindex (optional) : any input causes the correlation plot to be 	
%#				       displayed					
%#											
%# OUTPUT:	r : linear correlation coefficient between the two vectors		
%#											
%# AUTHOR:	Frederic Despagne							
%#		Copyright(c) 1997 for ChemoAC						
%#		Dienst FABI, Vrije Universiteit Brussel					
%#		Laarbeeklaan 103, 1090 Jette						
%#											
%# VERSION: 1.1 (28/02/1998)								
%#											
%# TEST: 	Roy De Maesschalck							

function r = corrplot(y,yhat,plotindex);

coeff = corrcoef(y,yhat);		% Calculate correlation matrix
r = coeff(1,2);				% Correlation coefficient between the two vectors

if nargin == 3				
	clf
	plot(y,yhat,'*b',y,y)		% Display correlation plot (optional)
	rens=sprintf('r=%10.5f',r);
	title(rens); xlabel('Observed values'); ylabel('Estimated values')
end



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -