[Dart-dev] [6065] DART/branches/development/models/cam/matlab/hop_test_check.m: These mods have been in my development branch for more than a year.

nancy at ucar.edu nancy at ucar.edu
Thu Apr 18 10:50:32 MDT 2013


Revision: 6065
Author:   thoar
Date:     2013-04-18 10:50:30 -0600 (Thu, 18 Apr 2013)
Log Message:
-----------
These mods have been in my development branch for more than a year.
Mostly syntactical changes to satiate m-lint.

Modified Paths:
--------------
    DART/branches/development/models/cam/matlab/hop_test_check.m

-------------- next part --------------
Modified: DART/branches/development/models/cam/matlab/hop_test_check.m
===================================================================
--- DART/branches/development/models/cam/matlab/hop_test_check.m	2013-04-18 00:27:49 UTC (rev 6064)
+++ DART/branches/development/models/cam/matlab/hop_test_check.m	2013-04-18 16:50:30 UTC (rev 6065)
@@ -59,9 +59,9 @@
 
 if (nargin > 3)
     vars = {varname};
-    pausecmd = 'fprintf(''pausing at level %d ... hit a key to continue\n'',ilevel), pause';
+    pausecmd = 'fprintf(''pausing at level %d ... hit a key to continue\n'',ilevel); pause';
 else
-    pausecmd = 'fprintf(''           level %d ... \n'',ilevel); pause(0.1)';
+    pausecmd = 'fprintf(''           level %d ... \n'',ilevel); pause(1.0)';
 end
 
 for i = 1:length(vars)
@@ -133,6 +133,7 @@
 else
     clim = [-datmax datmax];
 end
+histedges = FindHistogramEdges(clim,101);
 
 sbpos = [0.10 0.06 0.80 0.28; 
          0.10 0.43 0.80 0.28;
@@ -143,7 +144,7 @@
 figure(1); clf; orient tall; 
 
 subplot('position',sbpos(3,:))
-   hist(hopobj.change(:),50)
+   histc(hopobj.change(:),histedges)
    str1 = sprintf('(min %0.5g %s) hopping difference histogram (max %0.5g %s)', ...
                    slabmin, hopobj.units, slabmax, hopobj.units);
    title(str1,'Interpreter','none')
@@ -186,6 +187,7 @@
 orgmax  = max(orgslab(:));
 datmax  = max(abs([orgmin orgmax]));
 clim    = [-datmax datmax];
+histedges = FindHistogramEdges(clim,101);
 
 sbpos = [0.10 0.06 0.80 0.28; 
          0.10 0.43 0.80 0.28;
@@ -193,7 +195,7 @@
 
 figure(1); clf; orient tall; 
 subplot('position',sbpos(3,:))
-   hist(slab(:),50)
+   histc(slab(:),histedges)
    str1 = sprintf('(min %0.5g %s) hopping difference histogram (max %0.5g %s)', ...
                     slabmin, hopobj.units, slabmax, hopobj.units);
    title(str1,'Interpreter','none')
@@ -276,3 +278,9 @@
       break
    end
 end
+
+
+function x = FindHistogramEdges(minmax,nedges)
+
+x = minmax(1) + [1:nedges]*(minmax(2)-minmax(1))/(nedges-1);
+


More information about the Dart-dev mailing list