conn = database('ci_bootstrap_3','root','1q1q1q1q','com.mysql.jdbc.Driver','jdbc:mysql://localhost:3306/ci_bootstrap_3'); %数据库链接
ping(conn); &测试
lung1=exec(conn,'select lung from phytest where lung>0');
lung=fetch(lung1);
Y=lung.datamysql
%到这步Y=lung.data会显示出结果为 sql
%[XXX]数据库
%[xxx]bootstrap
%[xxx]
[Z2]=cell2mat(Y); %元胞数组数组
%此时输出结果为 XXX XXX XXX 测试
%这个时候能够直接作pearson相关系数了fetch
corr(Z1,Z2,'type','pearson')ci