Mercurial > hg > octave-nkf
changeset 4348:05415e529cef
[project @ 2003-02-21 06:22:48 by jwe]
author | jwe |
---|---|
date | Fri, 21 Feb 2003 06:22:48 +0000 |
parents | 024ef171aec3 |
children | a6c22c2c9b09 |
files | scripts/ChangeLog scripts/signal/spectral_adf.m scripts/signal/spectral_xdf.m scripts/statistics/base/ppplot.m scripts/statistics/base/qqplot.m scripts/statistics/tests/kolmogorov_smirnov_test.m |
diffstat | 6 files changed, 18 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,12 @@ +2003-02-20 John W. Eaton <jwe@bevo.che.wisc.edu> + + * statistics/tests/kolmogorov_smirnov_test.m: Use str2func to make + function handle to pass to feval. + * statistics/base/qqplot.m: Likewise. + * statistics/base/ppplot.m: Likewise. + * signal/spectral_xdf.m: Likewise. + * signal/spectral_adf.m: Likewise. + 2003-02-19 John W. Eaton <jwe@bevo.che.wisc.edu> * plot/axis.m: Avoid whitespace in literal matrix problem.
--- a/scripts/signal/spectral_adf.m +++ b/scripts/signal/spectral_adf.m @@ -48,7 +48,7 @@ if (nargin == 1) w = triangle_lw (cr, b); else - win = [win, "_lw"]; + win = str2func (strcat (win, "_lw")); w = feval (win, cr, b); endif
--- a/scripts/signal/spectral_xdf.m +++ b/scripts/signal/spectral_xdf.m @@ -47,7 +47,7 @@ if (nargin == 1) w = triangle_sw (xr, b); else - win = [win, "_sw"]; + win = str2func (strcat (win, "_sw")); w = feval (win, xr, b); endif
--- a/scripts/statistics/base/ppplot.m +++ b/scripts/statistics/base/ppplot.m @@ -57,9 +57,9 @@ n = length (x); p = ((1 : n)' - 0.5) / n; if (nargin == 1) - F = "stdnormal_cdf"; + F = @stdnormal_cdf; else - F = sprintf ("%s_cdf", dist); + F = str2func (sprintf ("%s_cdf", dist)); endif; if (nargin <= 2) y = feval (F, s);
--- a/scripts/statistics/base/qqplot.m +++ b/scripts/statistics/base/qqplot.m @@ -59,20 +59,20 @@ n = length (x); t = ((1 : n)' - .5) / n; if (nargin == 1) - f = "stdnormal_inv"; + f = @stdnormal_inv; else - f = sprintf ("%s_inv", dist); + f = str2func (sprintf ("%s_inv", dist)); endif; if (nargin <= 2) q = feval (f, t); - q_label = f; + q_label = func2str (f); else param_string = sprintf ("%g", varargin{1}); for k = 2 : (nargin - 2); param_string = sprintf ("%s, %g", param_string, varargin{k}) endfor q = eval (sprintf ("%s (t, %s);", f, param_string)); - q_label = sprintf ("%s with parameter(s) %s", f, param_string); + q_label = sprintf ("%s with parameter(s) %s", func2str (f), param_string); endif if (nargout == 0)