Home > ctdcal > stats_fit.m

stats_fit

PURPOSE ^

display some statistics

SYNOPSIS ^

function [stats,stats_deep]=stats_fit(newbotco,newctdco,press,tot,h_color,fittitle,plottitle);

DESCRIPTION ^

 display some statistics

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [stats,stats_deep]=stats_fit(newbotco,newctdco,press,tot,h_color,fittitle,plottitle);
0002 
0003 % display some statistics
0004 
0005 sub=length(find(finite(newbotco)==1));
0006 s=nanstd(newctdco-newbotco);
0007 res=nanmean(newctdco-newbotco);
0008 diary statistics_all
0009 disp(['fit: ' fittitle ' sensor: ' plottitle]);
0010 disp(['number of points used   ',int2str(sub)]);
0011 disp(['total number of points  ',int2str(tot)]);
0012 disp(['% of points used in fit ',num2str(100*sub/tot,4)]);
0013 disp(['fit standard deviation  ',num2str(s,4)]);
0014 disp(['fit mean residual       ',num2str(res,8)]);
0015 diary off
0016 
0017 
0018 stats(1,1)=100*sub/tot;
0019 stats(1,2)=s;
0020 stats(1,3)=res;
0021 %display statistics for deep values
0022 
0023 sub_deep=length(find(finite(newbotco)==1 & press >=h_color));
0024 aux1=find(press>=h_color);
0025 s_deep=nanstd(newctdco(aux1)-newbotco(aux1));
0026 res_deep=nanmean(newctdco(aux1)-newbotco(aux1));
0027 diary statistics_deep
0028 disp(['Deep fit : ' fittitle ' sensor: ' plottitle])
0029 disp(['number of points used   ',int2str(sub_deep)]);
0030 disp(['total number of points  ',int2str(tot)]);
0031 disp(['% of points used in fit ',num2str(100*sub_deep/tot,4)]);
0032 disp(['fit standard deviation  ',num2str(s_deep,4)]);
0033 disp(['fit mean residual       ',num2str(res_deep,8)]);
0034 diary off
0035 
0036 stats_deep(1,1)=100*sub_deep/tot;
0037 stats_deep(1,2)=s_deep;
0038 stats_deep(1,3)=res_deep;
0039 return

Generated on Fri 08-Oct-2004 11:57:17 by m2html © 2003