# HG changeset patch # User Thorsten Meyer # Date 1287427212 -7200 # Node ID a8ac114ec9ab5f1de499b9e70244446f08261cfb # Parent 8ea4cf59c41bc340a6940504b4dbda14523b4db6 Stylefixes, replace end by endif. diff -r 8ea4cf59c41b -r a8ac114ec9ab scripts/ChangeLog --- a/scripts/ChangeLog Mon Oct 18 14:33:03 2010 -0400 +++ b/scripts/ChangeLog Mon Oct 18 20:40:12 2010 +0200 @@ -1,3 +1,10 @@ +2010-10-18 Thorsten Meyer + + * general/gradient.m, linear-algebra/normest.m, plot/__gnuplot_print__.m, + plot/__print_parse_opts__.m, plot/daspect.m, + plot/gnuplot_drawnow.m, plot/pbaspect.m, plot/print.m, + signal/periodogram.m: Style fix, replace end by endfor. + 2010-10-18 Marco Caliari * polynomial/polyval.m: Use Horner's method. diff -r 8ea4cf59c41b -r a8ac114ec9ab scripts/general/gradient.m --- a/scripts/general/gradient.m Mon Oct 18 14:33:03 2010 -0400 +++ b/scripts/general/gradient.m Mon Oct 18 20:40:12 2010 +0200 @@ -122,7 +122,7 @@ ## have spacing value for each dimension if (length(varargin) != nd) error ("gradient: dimensions and number of spacing values do not match."); - end + endif for i = 1:nd if (isscalar (varargin{i})) d{i} = varargin{i} * ones (sz(i) - 1, 1); diff -r 8ea4cf59c41b -r a8ac114ec9ab scripts/linear-algebra/normest.m --- a/scripts/linear-algebra/normest.m Mon Oct 18 14:33:03 2010 -0400 +++ b/scripts/linear-algebra/normest.m Mon Oct 18 20:40:12 2010 +0200 @@ -66,7 +66,7 @@ x = rand (ncols, 1); else x = x / normx; - end + endif y = A' * x; n = norm (y); c += 1; diff -r 8ea4cf59c41b -r a8ac114ec9ab scripts/plot/__gnuplot_print__.m --- a/scripts/plot/__gnuplot_print__.m Mon Oct 18 14:33:03 2010 -0400 +++ b/scripts/plot/__gnuplot_print__.m Mon Oct 18 20:40:12 2010 +0200 @@ -41,7 +41,7 @@ else opts.fontsize = axesfontsize; endif - end + endif ## The axes-label and tick-label spacing is determined by ## the font spec given in "set terminal ..." gp_opts = font_spec (opts); diff -r 8ea4cf59c41b -r a8ac114ec9ab scripts/plot/__print_parse_opts__.m --- a/scripts/plot/__print_parse_opts__.m Mon Oct 18 14:33:03 2010 -0400 +++ b/scripts/plot/__print_parse_opts__.m Mon Oct 18 20:40:12 2010 +0200 @@ -253,7 +253,7 @@ && (! isdir (arg_st.name))); if (! file_exists) arg_st.append_to_file = false; - end + endif else arg_st.append_to_file = false; warning ("print.m: appended output requires ghostscript to be installed.") diff -r 8ea4cf59c41b -r a8ac114ec9ab scripts/plot/daspect.m --- a/scripts/plot/daspect.m Mon Oct 18 14:33:03 2010 -0400 +++ b/scripts/plot/daspect.m Mon Oct 18 20:40:12 2010 +0200 @@ -57,7 +57,7 @@ return else error ("daspect: only one output is allowed.") - end + endif case {"manual"} set (hax, "dataaspectratiomode", "manual"); case {"auto"} @@ -74,13 +74,13 @@ endif elseif (nargout == 0) print_usage (); - end + endif if (nargout == 1) varargout{1} = get (hax, "dataaspectratio"); elseif (nargout > 1) error ("daspect: only one output is allowed.") - end + endif endfunction diff -r 8ea4cf59c41b -r a8ac114ec9ab scripts/plot/gnuplot_drawnow.m --- a/scripts/plot/gnuplot_drawnow.m Mon Oct 18 14:33:03 2010 -0400 +++ b/scripts/plot/gnuplot_drawnow.m Mon Oct 18 20:40:12 2010 +0200 @@ -86,7 +86,7 @@ term, dumb_tmp_file); else enhanced = gnuplot_set_term (plot_stream (1), new_stream, h, term); - end + endif __go_draw_figure__ (h, plot_stream (1), enhanced, mono); fflush (plot_stream (1)); if (strcmp (term, "dumb")) @@ -102,9 +102,9 @@ if (a(1)==12) ## avoid ^L at the beginning a = a(2:end); - end + endif puts (a); - end + endif unlink (dumb_tmp_file); endif else @@ -221,7 +221,7 @@ else ## Use the gnuplot default. size_str = ""; - end + endif case {"aqua", "fig", "corel"} size_str = sprintf ("size %g %g", gnuplot_size); case "dxf" diff -r 8ea4cf59c41b -r a8ac114ec9ab scripts/plot/pbaspect.m --- a/scripts/plot/pbaspect.m Mon Oct 18 14:33:03 2010 -0400 +++ b/scripts/plot/pbaspect.m Mon Oct 18 20:40:12 2010 +0200 @@ -57,7 +57,7 @@ return else error ("pbaspect: only one output is allowed.") - end + endif case {"manual"} set (hax, "plotboxaspectratiomode", "manual"); case {"auto"} @@ -74,13 +74,13 @@ endif elseif (nargout == 0) print_usage (); - end + endif if (nargout == 1) varargout{1} = get (hax, "plotboxaspectratio"); elseif (nargout > 1) error ("pbaspect: only one output is allowed.") - end + endif endfunction diff -r 8ea4cf59c41b -r a8ac114ec9ab scripts/plot/print.m --- a/scripts/plot/print.m Mon Oct 18 14:33:03 2010 -0400 +++ b/scripts/plot/print.m Mon Oct 18 20:40:12 2010 +0200 @@ -592,10 +592,10 @@ cmd = opts.lpr_binary; if (! isempty (opts.lpr_options)) cmd = sprintf ("%s %s", cmd, opts.lpr_options); - end + endif if (! isempty (opts.printer)) cmd = sprintf ("%s -P %s", cmd, opts.printer); - end + endif elseif (isempty (opts.lpr_binary)) error ("print:nolpr", "print.m: 'lpr' not found in EXEC_PATH.") endif diff -r 8ea4cf59c41b -r a8ac114ec9ab scripts/signal/periodogram.m --- a/scripts/signal/periodogram.m Mon Oct 18 14:33:03 2010 -0400 +++ b/scripts/signal/periodogram.m Mon Oct 18 20:40:12 2010 +0200 @@ -137,7 +137,7 @@ rr = rem (length (x), nfft); if (rr) x = [x(:); (zeros (nfft-rr, 1))]; - end + endif x = sum (reshape (x, nfft, []), 2); endif @@ -182,7 +182,7 @@ plot (f, 10*log10 (Pxx)); xlabel ("frequency [Hz]"); ylabel ("Power density [dB/Hz]"); - end + endif grid on; title ("Periodogram Power Spectral Density Estimate"); else