Mercurial > forge
changeset 12019:b3dfecfecbf4 octave-forge
* tk_octave/inst/tk_dialog.m, tk_octave/inst/tk_scale.m,
graceplot/inst/alternatives/bar.m,
graceplot/inst/alternatives/print.m,
graceplot/inst/alternatives/legend.m,
fpl/inst/deprecated/FPL2trspdesurf.m,
fpl/inst/deprecated/FPL2trsptcsurf.m,
secs2d/inst/ThDDGOX/ThDDGOXeletiteration.m,
secs2d/inst/ThDDGOX/ThDDGOXthermaliteration.m,
secs2d/inst/ThDDGOX/ThDDGOXgummelmap.m,
secs2d/inst/DDGOX/DDGOXgummelmap.m,
secs2d/inst/QDDGOX/QDDGOXcompdens.m,
secs2d/inst/QDDGOX/QDDGOXgummelmap.m,
secs2d/inst/DDGOXT/DDGOXTgummelmap.m,
secs2d/inst/Utilities/Udopdepmob.m, bim/inst/bim2c_mesh_properties.m,
secs1d/bak/DDG/DDGgummelmap.m, ocs/inst/sbn/Mshichmanhodgesmosfet.m,
ocs/inst/sbn/Mcurrentsources.m, ocs/inst/prs/prs_iff.m,
ocs/inst/tst/tst_theta_method.m, ocs/inst/tst/tst_odepkg.m,
ocs/inst/nls/nls_newton_raphson.m, ocs/inst/asm/asm_build_system.m,
msh/inst/msh3m_geometrical_properties.m, gnuplot/inst/g_ez.m,
gnuplot/inst/g_plot.m, gnuplot/inst/myimage.m,
gnuplot/inst/_g_instantiate.m, gnuplot/inst/g_demo.m,
gnuplot/inst/_g_tics.m, gnuplot/inst/g_cmd.m,
gnuplot/inst/_g_image_cmd.m, gnuplot/inst/g_config.m,
gnuplot/inst/g_locate.m, gnuplot/inst/g_data.m, pdb/inst/write_pdb.m,
optim/inst/__poly_2_extrema.m, optim/inst/test_min_2.m,
optim/inst/nonlin_curvefit.m, optim/inst/test_min_4.m,
optim/inst/private/__collect_constraints__.m,
optim/inst/private/__covp_corp_wls__.m,
optim/inst/private/__lm_feasible__.m,
optim/inst/private/__residmin_stat__.m,
optim/inst/private/__nonlin_residmin__.m,
optim/inst/private/__siman__.m, optim/inst/test_d2_min_2.m,
optim/inst/nelder_mead_min.m, optim/inst/optimset_compat.m,
optim/inst/cdiff.m, optim/inst/test_wpolyfit.m, optim/inst/minimize.m,
optim/inst/test_min_1.m, optim/inst/test_min_3.m, optim/inst/d2_min.m,
optim/inst/curvefit_stat.m, optim/inst/test_nelder_mead_min_2.m,
optim/inst/poly_2_ex.m, optim/inst/nonlin_min.m,
optim/inst/fminunc_compat.m, optim/inst/vfzero.m,
optim/inst/brent_line_min.m, comm/inst/huffmandict.m,
audio/inst/auplot.m, audio/inst/auload.m, miscellaneous/inst/asci.m,
nnet/inst/private/__trainlm.m, database/inst/pq_exec_params.m,
database/inst/pq_connect.m, io/inst/append_save.m,
general/inst/adresamp2.m, plot/inst/dxfwrite.m,
plot/inst/calc_shading.m, queueing/inst/qncsconv.m,
queueing/inst/qnmix.m, queueing/inst/qnmarkov.m,
queueing/inst/ctmcfpt.m, queueing/inst/dtmcfpt.m,
queueing/inst/qncmmva.m, queueing/inst/qncsconvld.m,
queueing/inst/qnmknode.m, queueing/inst/qncmbsb.m,
queueing/inst/ctmc.m, queueing/inst/qncmpopmix.m,
queueing/inst/qsmm1.m, queueing/inst/qncmvisits.m,
queueing/inst/qncsmvablo.m, queueing/inst/qncsvisits.m,
queueing/inst/qncsaba.m, queueing/inst/qsmm1k.m,
queueing/inst/qsmminf.m, queueing/inst/qnom.m,
queueing/inst/qncscmva.m, queueing/inst/qnomvisits.m,
queueing/inst/ctmcmtta.m, queueing/inst/qnvisits.m,
queueing/inst/qnos.m, queueing/inst/qnosvisits.m,
queueing/inst/qnosaba.m, queueing/inst/qncspb.m,
queueing/inst/ctmcexps.m, queueing/inst/dtmc.m,
queueing/inst/qncsmvaap.m, queueing/inst/qncmnpop.m,
queueing/inst/dtmcbd.m, queueing/inst/qncmcb.m,
queueing/inst/qncsgb.m, queueing/inst/dtmcmtta.m,
queueing/inst/private/sumexpn.m, queueing/inst/private/expn.m,
queueing/inst/qnsolve.m, queueing/inst/dtmcexps.m,
queueing/inst/qnjackson.m, queueing/inst/qncsmvald.m,
queueing/inst/qsmmm.m, queueing/inst/qncsbsb.m,
queueing/inst/qsammm.m, queueing/inst/ctmcbd.m,
queueing/inst/ctmcchkQ.m, queueing/inst/qncmaba.m,
queueing/inst/qsmmmk.m, queueing/inst/qnosbsb.m,
queueing/inst/qnomaba.m, queueing/inst/qncmmvaap.m,
queueing/devel/qnmmmk_alt.m, queueing/devel/qnclosedsinglecmva.m,
queueing/devel/qnopenmultig.m, queueing/doc/demo_web.m,
queueing/doc/munge-texi.m:
Use ... for continuation marker to avoid deprecated syntax warning.
line wrap: on
line diff
--- a/extra/bim/inst/bim2c_mesh_properties.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/bim/inst/bim2c_mesh_properties.m Wed Aug 28 20:24:54 2013 +0000 @@ -41,7 +41,7 @@ endif omesh = imesh; - [omesh.wjacdet,omesh.area,omesh.shg] = \ + [omesh.wjacdet,omesh.area,omesh.shg] = ... msh2m_geometrical_properties(imesh,"wjacdet","area","shg"); endfunction
--- a/extra/fpl/inst/deprecated/FPL2trspdesurf.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/fpl/inst/deprecated/FPL2trspdesurf.m Wed Aug 28 20:24:54 2013 +0000 @@ -49,7 +49,7 @@ seriesend = columns(varargin{3}); dataname = mktemp("/tmp",".dx"); colorname = varargin{2}; - FPL2dxoutputtimeseries(dataname, varargin{1}.p, varargin{1}.t, \ + FPL2dxoutputtimeseries(dataname, varargin{1}.p, varargin{1}.t, ... varargin{3}, "dataseries", 0, 1, 1:seriesend); scriptname = mktemp("/tmp",".net");
--- a/extra/fpl/inst/deprecated/FPL2trsptcsurf.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/fpl/inst/deprecated/FPL2trsptcsurf.m Wed Aug 28 20:24:54 2013 +0000 @@ -53,8 +53,8 @@ seriesend = columns(varargin{ii+2}); dataname = mktemp("/tmp",".dx"); colorname = varargin{ii+1}; - FPL2dxoutputtimeseries(dataname, varargin{ii}.p, varargin{ii}.t, \ - varargin{ii+2}, "dataseries", 0, 1, \ + FPL2dxoutputtimeseries(dataname, varargin{ii}.p, varargin{ii}.t, ... + varargin{ii+2}, "dataseries", 0, 1, ... 1:seriesend); datalist = strcat(datalist, """", dataname ,""""); colorlist = strcat(colorlist, """", colorname, """");
--- a/extra/gnuplot/inst/_g_image_cmd.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/gnuplot/inst/_g_image_cmd.m Wed Aug 28 20:24:54 2013 +0000 @@ -82,22 +82,22 @@ yr = yr([2 1]); end -s2 = sprintf (" origin=(%g,%g) ",\ - xr(1) + 0.5*diff(xr)/sz(2), \ +s2 = sprintf (" origin=(%g,%g) ",... + xr(1) + 0.5*diff(xr)/sz(2), ... yr(1) + 0.5*diff(yr)/sz(1)); -s3 = sprintf (" dx=%g dy=%g ",\ - (xr(2)-xr(1))/sz(2),\ +s3 = sprintf (" dx=%g dy=%g ",... + (xr(2)-xr(1))/sz(2),... (yr(2)-yr(1))/sz(1)); s4 = " format='%uchar' "; if !is_col - s5 = sprintf (" using (%g*$1/255+%g) ",\ + s5 = sprintf (" using (%g*$1/255+%g) ",... diff(zrange), zrange(1)); s6 = [" with image "]; else - s5 = sprintf (" using (%g*$1/255+%g):(%g*$2/255+%g):(%g*$3/255+%g) ",\ + s5 = sprintf (" using (%g*$1/255+%g):(%g*$2/255+%g):(%g*$3/255+%g) ",... [diff(zrange);zrange(1)]*[1 1 1]); s6 = [" with rgbimage "]; end
--- a/extra/gnuplot/inst/_g_instantiate.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/gnuplot/inst/_g_instantiate.m Wed Aug 28 20:24:54 2013 +0000 @@ -52,7 +52,7 @@ g.cmds end_of_lines keyboard - error ("g.cmds has %i elements, but cmd_str has %i lines",\ + error ("g.cmds has %i elements, but cmd_str has %i lines",... length (g.cmds), length (end_of_lines) - 1); endif for i = 1:length(end_of_lines)-1
--- a/extra/gnuplot/inst/_g_tics.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/gnuplot/inst/_g_tics.m Wed Aug 28 20:24:54 2013 +0000 @@ -38,7 +38,7 @@ end end -if ! (length (major) == N && all (major == 0 | major == 1) \ +if ! (length (major) == N && all (major == 0 | major == 1) ... || all (major >= 1 & major <= N & major == round (major))) major values
--- a/extra/gnuplot/inst/g_cmd.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/gnuplot/inst/g_cmd.m Wed Aug 28 20:24:54 2013 +0000 @@ -70,14 +70,14 @@ if nPrintArgs < 0 # Not provided: search for end label label = ["/",label]; # End label - while lastPrintArg<=length(varargin) \ - && ( !ischar (varargin{lastPrintArg}) \ + while lastPrintArg<=length(varargin) ... + && ( !ischar (varargin{lastPrintArg}) ... || !strcmp (varargin{lastPrintArg}, label)) lastPrintArg++; endwhile if lastPrintArg > length(varargin) - warning ("g_cmd_PRINTF_NOT_CLOSED",\ + warning ("g_cmd_PRINTF_NOT_CLOSED",... "Can't find closing label for '%s'",cmds); i = lastPrintArg; else @@ -136,19 +136,19 @@ g2.cmds = {g2.cmds{1:i2-1}}; endif if 0 - g.cmds = {g.cmds{:}, \ - ["cd '",g2.dir,"'"],\ - g2.cmds{:},\ + g.cmds = {g.cmds{:}, ... + ["cd '",g2.dir,"'"],... + g2.cmds{:},... ["cd '",g.dir,"'"]}; endif if 1 #printf ("Insert at %i\n",insert_pos); #g2.cmds #g.cmds - g.cmds = csplice (g.cmds, insert_pos, 0, \ - {["cd '",g2.dir,"'"], \ - g2.cmds{:}, \ - ["cd '",g.dir,"'"]\ + g.cmds = csplice (g.cmds, insert_pos, 0, ... + {["cd '",g2.dir,"'"], ... + g2.cmds{:}, ... + ["cd '",g.dir,"'"]... }); insert_pos += 2 + length (g2.cmds); #g.cmds @@ -161,7 +161,7 @@ error ("Command %i is a struct but not a 'gnuplot_object'\n", i); endif else - error ("Command %i is neither string nor struct, but a",\ + error ("Command %i is neither string nor struct, but a",... i, typeinfo (varargin{i})); endif endwhile @@ -180,7 +180,7 @@ if isfield (g.values, "title") multiplot_cmd = [multiplot_cmd," '",g.values.title,"'"]; endif - g.cmds = {multiplot_cmd,\ + g.cmds = {multiplot_cmd,... g.cmds{:}}; endif endif
--- a/extra/gnuplot/inst/g_config.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/gnuplot/inst/g_config.m Wed Aug 28 20:24:54 2013 +0000 @@ -11,10 +11,10 @@ function res = g_config (varargin) -persistent g_config_struct = \ - struct ("gnuplot_program", "gnuplot",\ - "png_viewer", "eog",\ - "eps_viewer", "gv",\ +persistent g_config_struct = ... + struct ("gnuplot_program", "gnuplot",... + "png_viewer", "eog",... + "eps_viewer", "gv",... "gnuplot_version", nan); if all (numel (varargin) != [1 2])
--- a/extra/gnuplot/inst/g_data.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/gnuplot/inst/g_data.m Wed Aug 28 20:24:54 2013 +0000 @@ -75,7 +75,7 @@ if columns (varargin{i}) == columns (data) data = [data;varargin{i}]; else - error ("Data was %i columns wide until now, but arg %i is %i wide",\ + error ("Data was %i columns wide until now, but arg %i is %i wide",... columns(data), i, columns(varargin{i})); endif endif @@ -130,7 +130,7 @@ endif count = fwrite (fid, uint8(data), "uint8"); if count != prod (size (data)) - error ("Could only write %i out of %i bytes of data.",\ + error ("Could only write %i out of %i bytes of data.",... count, prod (size (data))); endif fclose (fid);
--- a/extra/gnuplot/inst/g_demo.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/gnuplot/inst/g_demo.m Wed Aug 28 20:24:54 2013 +0000 @@ -32,15 +32,15 @@ printf ("Hit any key for the next plot\n"); pause; hh = g_new("geometry","640x330"); - hh = g_cmd (hh,\ - "pr:1:set multiplot title \"Two (%i) of the same\"", 2,\ - "set size 0.5,0.9",\ - "set origin 0,0",\ - _g_instantiate (gg,"COL",1),\ - "set origin 0.5,0",\ - gg,\ - "set size 1,1",\ - "set origin 0,0"\ + hh = g_cmd (hh,... + "pr:1:set multiplot title \"Two (%i) of the same\"", 2,... + "set size 0.5,0.9",... + "set origin 0,0",... + _g_instantiate (gg,"COL",1),... + "set origin 0.5,0",... + gg,... + "set size 1,1",... + "set origin 0,0"... ); if save_snapshots plot_extras = {sprintf(image_tpl, g_demo_plot_cnt++)}; @@ -48,12 +48,12 @@ g_plot (hh, "-wait",plot_extras{:}); pause ff = g_new("geometry","400x400"); - ff = g_cmd (ff,\ - "pr:1:set multiplot title \"Four (%i) of the same\"", 4,\ - g_locate (_g_instantiate (gg,"COL",1),[0.0, 0.0, 0.45, 0.45]),\ - g_locate (_g_instantiate (gg,"COL",2),[0.55, 0.0, 0.45, 0.45]),\ - g_locate (_g_instantiate (gg,"COL",3),[0.0, 0.5, 0.45, 0.45]),\ - g_locate (_g_instantiate (gg,"COL",4),[0.55, 0.5, 0.45, 0.45])\ + ff = g_cmd (ff,... + "pr:1:set multiplot title \"Four (%i) of the same\"", 4,... + g_locate (_g_instantiate (gg,"COL",1),[0.0, 0.0, 0.45, 0.45]),... + g_locate (_g_instantiate (gg,"COL",2),[0.55, 0.0, 0.45, 0.45]),... + g_locate (_g_instantiate (gg,"COL",3),[0.0, 0.5, 0.45, 0.45]),... + g_locate (_g_instantiate (gg,"COL",4),[0.55, 0.5, 0.45, 0.45])... ); if save_snapshots plot_extras = {sprintf(image_tpl, g_demo_plot_cnt++)}; @@ -88,13 +88,13 @@ kk = g_new ("wait",1,"geometry",[400,400]); kk = g_data(kk, "-uint8","checker",imgdata); - kk = g_cmd (kk, \ - "set palette gray",\ - "set title 'Binary array: Checkerboard seen in 2D'",\ - "plot 'checker' binary array=8x8 flipy format='%uchar' with image",\ - "pause 1",\ - "pause -1",\ - "set title 'Binary array: Checkerboard seen in 3D'",\ + kk = g_cmd (kk, ... + "set palette gray",... + "set title 'Binary array: Checkerboard seen in 2D'",... + "plot 'checker' binary array=8x8 flipy format='%uchar' with image",... + "pause 1",... + "pause -1",... + "set title 'Binary array: Checkerboard seen in 3D'",... "splot [0:9] [0:9] 'checker' binary array=8x8 flipy perp=(0,1,0) center=(4,4,4) format='%uchar' with image"); if save_snapshots @@ -106,9 +106,9 @@ ll = g_new ("wait",1); ll = g_data(ll, "sombrero",zz); - ll = g_cmd (ll, \ - "set palette gray",\ - "set title 'Image saved as text matrix: Sombrero'",\ + ll = g_cmd (ll, ... + "set palette gray",... + "set title 'Image saved as text matrix: Sombrero'",... "splot [-25:25] [-25:25] 'sombrero' matrix using ($1-25):($2-25):($3) with image"); if save_snapshots @@ -121,8 +121,8 @@ zrgb *= 255/max(zrgb(:)); mm = g_new ("wait",1); mm = g_data(mm, "-uint8","sombrero",zrgb); - mm = g_cmd (mm, \ - "set title 'Image saved as text matrix: Sombrero'",\ + mm = g_cmd (mm, ... + "set title 'Image saved as text matrix: Sombrero'",... "plot 'sombrero' binary array=51x51 origin=(-25,-25) format='%uchar%uchar%uchar' with rgbimage"); if save_snapshots
--- a/extra/gnuplot/inst/g_ez.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/gnuplot/inst/g_ez.m Wed Aug 28 20:24:54 2013 +0000 @@ -66,14 +66,14 @@ while cnt < N cmd = varargin{cnt}; if !ischar (cmd) - error ("Expecting string, got a '%s' as %ith argument",\ + error ("Expecting string, got a '%s' as %ith argument",... typeinfo(cmd),cnt); end # It's a filename - if length (cmd) > 3 \ - && (strcmp (cmd(end-3:end), ".eps") \ - || strcmp (cmd(end-3:end), ".fig")\ + if length (cmd) > 3 ... + && (strcmp (cmd(end-3:end), ".eps") ... + || strcmp (cmd(end-3:end), ".fig")... || strcmp (cmd(end-3:end), ".png")) # || strcmp (cmd(end-3:end), ".ppm")\ # || strcmp (cmd(end-3:end), ".pgm")\ @@ -88,7 +88,7 @@ case {"title", "xlabel", "ylabel", "x2label", "y2label"}, str = varargin{++cnt}; if !ischar (str), - error ("Option '%s' requires a char argument; got a %s",\ + error ("Option '%s' requires a char argument; got a %s",... cmd, typeinfo (str)); endif #str = strrep (str,"%","\\%") @@ -104,16 +104,16 @@ str = varargin{++cnt}; if !ischar (str), - error ("Option '%s' requires a char argument; got a %s",\ + error ("Option '%s' requires a char argument; got a %s",... cmd, typeinfo (str)); endif pos = varargin{++cnt}; if !isnumeric (pos), - error ("Option '%s' requires a 1 x 2 matrix argument; got a %s",\ + error ("Option '%s' requires a 1 x 2 matrix argument; got a %s",... cmd, typeinfo (pos)); endif if length (pos) != 2 - error ("Option '%s' requires a 1 x 2 matrix argument; got %s",\ + error ("Option '%s' requires a 1 x 2 matrix argument; got %s",... cmd, sprintf("%i x",size (pos))(1:end-2)); endif labels = {labels{:},str}; @@ -145,7 +145,7 @@ data = varargin{++cnt}; if !isnumeric (data) - error ("Argument after 'plot' should be numeric. Got '%s'.",\ + error ("Argument after 'plot' should be numeric. Got '%s'.",... typeinfo(data)); endif orig_data_size = size (data); @@ -165,11 +165,11 @@ tmp = tmp'; end end - if rows (data) == rows (tmp) \ + if rows (data) == rows (tmp) ... && columns (data) == 1 data = data*ones(1,columns(tmp)); # Replicate abscissa data else - error ("First 'plot' arg is %i x %i, while 2nd is %i x %i\n",\ + error ("First 'plot' arg is %i x %i, while 2nd is %i x %i\n",... orig_data_size, size (tmp)); endif endif @@ -200,8 +200,8 @@ # Labels passed as a vector: turn into a cell if isnumeric (try_arg) && ! isempty (try_arg) if numel (try_arg) > rows (data) - error (["Don't know what to do with third numeric argument of size",\ - sprintf(" %i",size(try_arg)),". Plot has has %i points"],\ + error (["Don't know what to do with third numeric argument of size",... + sprintf(" %i",size(try_arg)),". Plot has has %i points"],... rows(data)); end try_arg = num2cell (try_arg); @@ -263,10 +263,10 @@ end boxData = boxplot_data (the_data); boxWid = 0.1; - data = [data;\ - [ data1(i)+boxWid*[1 -1 -1 1 1 -1 -1]/2;\ - boxData.quantiles([3 3 2 2 4 4 3])']';\ - [ data1(i)*[1 1 1 1];\ + data = [data;... + [ data1(i)+boxWid*[1 -1 -1 1 1 -1 -1]/2;... + boxData.quantiles([3 3 2 2 4 4 3])']';... + [ data1(i)*[1 1 1 1];... boxData.quantiles([1 2 4 5])']';]; stops = [stops, [7 9 11]+11*(i-1)]; end @@ -329,9 +329,9 @@ if length (args.cmds), g = g_cmd (g, args.cmds{:}); endif # set all in g.cmds - tmp = {"title", \ - "xrange", "yrange", "y2range", "x2range", \ - "xlabel", "ylabel", "x2label", "y2label", \ + tmp = {"title", ... + "xrange", "yrange", "y2range", "x2range", ... + "xlabel", "ylabel", "x2label", "y2label", ... "grid", "xgrid", "ygrid"}; for i = 1:length(tmp) if isfield (args, tmp{i}) @@ -361,7 +361,7 @@ rng = [inf,-inf]; for i = 1:nplots if all (img_indices != i) - rng = [min(rng(1), min (plots{i}(:,1))), \ + rng = [min(rng(1), min (plots{i}(:,1))), ... max(rng(2), max (plots{i}(:,1)))]; end end
--- a/extra/gnuplot/inst/g_locate.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/gnuplot/inst/g_locate.m Wed Aug 28 20:24:54 2013 +0000 @@ -14,7 +14,7 @@ found_origin = found_size = 0; for i = 1:length (g.cmds) - [dums,dume,dumte,dumm,toks] = \ + [dums,dume,dumte,dumm,toks] = ... regexp (g.cmds{i}, '^set\s*(origin|size)\s*([^,\s]+)\s*,\s*([^,\s]+)'); if length (toks) args = [str2num(toks{1}{2}), str2num(toks{1}{3})]; @@ -33,11 +33,11 @@ endfor if ! found_size && any ((newloc(1:2)) || any (newloc(3:4)!= 1)) - g.cmds = {sprintf("set size %g,%g",newloc(3:4)),\ + g.cmds = {sprintf("set size %g,%g",newloc(3:4)),... g.cmds{:}}; endif if ! found_origin && any (newloc(3:4)!= 1) - g.cmds = {sprintf("set origin %g,%g",newloc(1:2)),\ + g.cmds = {sprintf("set origin %g,%g",newloc(1:2)),... g.cmds{:}}; endif
--- a/extra/gnuplot/inst/g_plot.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/gnuplot/inst/g_plot.m Wed Aug 28 20:24:54 2013 +0000 @@ -68,9 +68,9 @@ while i <= length (varargin) opt = varargin{i++}; ll = length(opt); - if ll>=4 \ - && (strcmp (opt(ll-3:ll), ".eps") \ - || strcmp (opt(ll-3:ll), ".fig") \ + if ll>=4 ... + && (strcmp (opt(ll-3:ll), ".eps") ... + || strcmp (opt(ll-3:ll), ".fig") ... || strcmp (opt(ll-3:ll), ".png")) if do_eps || do_fig || do_png, @@ -95,7 +95,7 @@ keep([i-2,i-1]) = 0; elseif strcmp (opt, "-display") - if i > length (varargin) \ + if i > length (varargin) ... || (i == length(varargin) && !isnumeric (varargin{i})) do_display = 1; keep([i-1]) = 0; @@ -104,7 +104,7 @@ keep([i-2,i-1]) = 0; endif elseif strcmp (opt, "-color") - if i > length (varargin) \ + if i > length (varargin) ... || (i == length(varargin) && !isnumeric (varargin{i})) do_color = 1; keep([i-1]) = 0; @@ -152,11 +152,11 @@ if do_color, colorStr = "color"; else colorStr = "monochrome"; end if do_eps - pre_cmd = {sprintf("set term postscript eps %s size %.1fcm,%.1fcm 20",colorStr,geometry),\ + pre_cmd = {sprintf("set term postscript eps %s size %.1fcm,%.1fcm 20",colorStr,geometry),... ["set out '",outputFile,"'"]}; elseif do_fig - pre_cmd = {sprintf("set term fig big landscape metric %s fontsize 20 ",colorStr),\ + pre_cmd = {sprintf("set term fig big landscape metric %s fontsize 20 ",colorStr),... ["set out '",outputFile,"'"]}; elseif do_png @@ -172,18 +172,18 @@ pcolors = "xffffff x000000 x000000 x000000 x808080 xA0A0A0 xE0E0E0 x404040 xC0C0C0 x202020"; end end - pre_cmd = {sprintf("set term png truecolor size %i, %i %s",geometry, pcolors),\ + pre_cmd = {sprintf("set term png truecolor size %i, %i %s",geometry, pcolors),... ["set out '",outputFile,"'"]}; elseif wait_for_q # Not eps and -wait - pre_cmd = {pre_cmd{:},\ - "set mouse",\ - "set mouse labels",\ - "set mouse verbose"\ + pre_cmd = {pre_cmd{:},... + "set mouse",... + "set mouse labels",... + "set mouse verbose"... }; - pos_cmd = {pos_cmd{:},\ + pos_cmd = {pos_cmd{:},... "pause -1"}; ## FIXME: gnuplot croaks w/ warning: Mousing not active, even if I've set mouse.. @@ -230,7 +230,7 @@ fclose (fid); ##system (["cat ",cmdfname]); - gnuplot_command = [g_config("gnuplot_program")," ",gnuplot_options,\ + gnuplot_command = [g_config("gnuplot_program")," ",gnuplot_options,... " ",cmdfname]; output_file = [g.dir,"/gnuplot-output.txt"];
--- a/extra/gnuplot/inst/myimage.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/gnuplot/inst/myimage.m Wed Aug 28 20:24:54 2013 +0000 @@ -161,8 +161,8 @@ ## printf ("Scaling up by %i\n",scl); scl0 = round (1/scl); if is_col - im = reshape ([kron(im(1:3:end,:), ones (scl0))(:),\ - kron(im(2:3:end,:), ones (scl0))(:),\ + im = reshape ([kron(im(1:3:end,:), ones (scl0))(:),... + kron(im(2:3:end,:), ones (scl0))(:),... kron(im(3:3:end,:), ones (scl0))(:)]', R*scl0,C*scl0); else @@ -194,7 +194,7 @@ imax = vrange(4:6); irng = imax - imin; else - error ("range should have 2 or 6 elements; got %s",\ + error ("range should have 2 or 6 elements; got %s",... sprintf("%i x ",size(vrange))(1:end-3)); end else @@ -262,7 +262,7 @@ # Image w/ room for image and scale below scale_im0 = ones(scale_R/2,1)*linspace(0,255,scale_C); if invert, scale_im0 = 255 - scale_im0; end - scale_im = [255+zeros(scale_R/2,scale_C);\ + scale_im = [255+zeros(scale_R/2,scale_C);... scale_im0]; tn = [tempname(),".pgm"]; if imin && abs(log10(abs(imin)))>5, ado = sprintf ("%.3g",imin); @@ -281,13 +281,13 @@ psz = round(8*scale_C/128); - ado = sprintf ("-annotate +%i+%i \"%s\"",\ - 2,\ - psz,\ + ado = sprintf ("-annotate +%i+%i \"%s\"",... + 2,... + psz,... ado); - aup = sprintf ("-annotate +%i+%i \"%s\"",\ - scale_C-length(aup)*round(5*psz/10)-3,\ - psz,\ + aup = sprintf ("-annotate +%i+%i \"%s\"",... + scale_C-length(aup)*round(5*psz/10)-3,... + psz,... aup); @@ -299,7 +299,7 @@ padded_im = 255*ones (R+scale_R,pC); padded_im(1:R,floor((pC-C)/2)+(1:C)) = im; - padded_im(R+1:R+scale_R,floor((pC-scale_C)/2)+(1:scale_C)) = \ + padded_im(R+1:R+scale_R,floor((pC-scale_C)/2)+(1:scale_C)) = ... double (scale_im); im = padded_im; endif @@ -321,7 +321,7 @@ if show_range # Get the text back in bw im(3*R+(1:3*scale_R),1:floor((pC-scale_C)/2)) = 255; im(3*R+(1:3*scale_R),floor((pC+scale_C)/2):end) = 255; - im(3*R+(1:3*scale_R/2),floor((pC-scale_C)/2)+(1:scale_C)) = \ + im(3*R+(1:3*scale_R/2),floor((pC-scale_C)/2)+(1:scale_C)) = ... kron (double (scale_im(1:scale_R/2,:)),ones(3,1)); endif @@ -342,15 +342,15 @@ i = 1; while i < length (text) if !isnumeric (text{i}), - error ("Arg of type '%s' where numeric required, in 'text' option",\ + error ("Arg of type '%s' where numeric required, in 'text' option",... typeinfo(text{i})); end if length (text{i}) != 2 && length (text{i}) != 3 - error ("Position argument has size %s (should have 2 or 3 elements)",\ + error ("Position argument has size %s (should have 2 or 3 elements)",... sprintf("%i x ",size(text{i})(1:end-3))); endif if !ischar (text{i+1}), - error ("Arg of type '%s' where string required, in 'text' option",\ + error ("Arg of type '%s' where string required, in 'text' option",... typeinfo(text{i+1})); endif if !length (text{i+1}), i+=2; continue; endif @@ -377,8 +377,8 @@ bbh = 0.98*bbh + 0.01*bbh([1 1 2]) + 0.01*bbh([2 3 3]); [dummy,tmp] = min (bbh); ##im(txtbb(1):txtbb(3),txtbb(2):txtbb(4)) = 0; - fillColorStr = {"-fill \"#000000\" ",\ - "-fill \"#A0A0A0\" ",\ + fillColorStr = {"-fill \"#000000\" ",... + "-fill \"#A0A0A0\" ",... "-fill \"#ffffff\" "}{tmp}; wopts = [wopts, fillColorStr]; @@ -395,16 +395,16 @@ ll = line{i}(:); lll = length(ll); if !isnumeric (ll) - error ("%ith 'line' argument is of type '%s', not numeric",\ + error ("%ith 'line' argument is of type '%s', not numeric",... i, typeinfo(line{i})); endif if lll < 4 - error ("%ith 'line' argument has %i elements, 4 at least are needed",\ + error ("%ith 'line' argument has %i elements, 4 at least are needed",... i, lll); endif if lll > 8 - error ("%ith 'line' argument has %i elements, 8 at most are taken",\ + error ("%ith 'line' argument has %i elements, 8 at most are taken",... i, lll) endif rgb = [nan,nan,nan]; @@ -442,8 +442,8 @@ # If I save, should I do sthing for transparency? nanmaskfile = ""; - if filename && any (nanmask(:))\ - && (strcmp (filename(end-3:end), ".png")\ + if filename && any (nanmask(:))... + && (strcmp (filename(end-3:end), ".png")... || strcmp (filename(end-3:end), ".gif")) nanmaskfile = "tmp-mask.pgm" @@ -460,21 +460,21 @@ RC3 = prod (size(im)); RC = size(im)./[3 1]; - imwrite (filename, \ - reshape(uint8 (im(1:3:RC3)),RC),\ - reshape(uint8 (im(2:3:RC3)),RC),\ - reshape(uint8 (im(3:3:RC3)),RC),\ + imwrite (filename, ... + reshape(uint8 (im(1:3:RC3)),RC),... + reshape(uint8 (im(2:3:RC3)),RC),... + reshape(uint8 (im(3:3:RC3)),RC),... wopts); end # If there's transparency, do a separate call to convert if length(nanmaskfile) - ["convert ",filename," ",\ - "tmp-mask.pgm -quality 100 +matte -compose CopyOpacity ",\ + ["convert ",filename," ",... + "tmp-mask.pgm -quality 100 +matte -compose CopyOpacity ",... filename] system (["cp ",filename," tmp-im.png"]) - system (["convert ",filename," ",\ - "tmp-mask.pgm -quality 100 +matte -compose CopyOpacity ",\ + system (["convert ",filename," ",... + "tmp-mask.pgm -quality 100 +matte -compose CopyOpacity ",... filename]); endif if do_show
--- a/extra/graceplot/inst/alternatives/bar.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/graceplot/inst/alternatives/bar.m Wed Aug 28 20:24:54 2013 +0000 @@ -128,12 +128,12 @@ endif __grnewset__(); [cur_figure, cur_graph, cur_set] = __grgetstat__(); - __grcmd__(sprintf("focus g%i; g%i type bar; autoscale onread xyaxes", \ + __grcmd__(sprintf("focus g%i; g%i type bar; autoscale onread xyaxes", ... cur_graph, cur_graph)); __grcmd__(sprintf("g%i.s%i line type 0", cur_graph, cur_set)); ## simple heuristics to set the bar width to be approximately correct bar_width = 42.0 / size(gr_mat,1) / 1.5 - __grcmd__(sprintf("g%i.s%i symbol size %g", cur_graph, cur_set,\ + __grcmd__(sprintf("g%i.s%i symbol size %g", cur_graph, cur_set,... bar_width)); __grsendmat__(gr_mat, "bar"); else
--- a/extra/graceplot/inst/alternatives/legend.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/graceplot/inst/alternatives/legend.m Wed Aug 28 20:24:54 2013 +0000 @@ -184,7 +184,7 @@ otherwise warning ("incorrect pos"); endswitch; - elseif (isvector (pos_leg)) && (length (pos_leg) == 2) && \ + elseif (isvector (pos_leg)) && (length (pos_leg) == 2) && ... (all(isreal(pos_leg))) __grcmd__(sprintf("legend %f,%f", pos_leg(1), pos_leg(2))); else
--- a/extra/graceplot/inst/alternatives/print.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/graceplot/inst/alternatives/print.m Wed Aug 28 20:24:54 2013 +0000 @@ -341,19 +341,19 @@ __grcmd__(sprintf("device \"%s\" op \"grayscale\"", grdevname)); endif - elseif( strcmp(dev, "pnm") || strcmp(dev, "pbm") \ + elseif( strcmp(dev, "pnm") || strcmp(dev, "pbm") ... || strcmp(dev, "pgm") || strcmp(dev, "ppm") ) grdevname = "PNM"; __grcmd__(sprintf("hardcopy device \"%s\"", grdevname)); __grcmd__(sprintf("device \"%s\" op \"rawbits:off\"", grdevname)); if(strcmp(dev, "pbm")) - __grcmd__(sprintf("device \"%s\" op \"format:pbm\"", \ + __grcmd__(sprintf("device \"%s\" op \"format:pbm\"", ... grdevname)); elseif(strcmp(dev, "pgm")) - __grcmd__(sprintf("device \"%s\" op \"format:pgm\"", \ + __grcmd__(sprintf("device \"%s\" op \"format:pgm\"", ... grdevname)); elseif(strcmp(dev, "ppm")) - __grcmd__(sprintf("device \"%s\" op \"format:ppm\"", \ + __grcmd__(sprintf("device \"%s\" op \"format:ppm\"", ... grdevname)); endif
--- a/extra/msh/inst/msh3m_geometrical_properties.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/msh/inst/msh3m_geometrical_properties.m Wed Aug 28 20:24:54 2013 +0000 @@ -79,23 +79,23 @@ request = varargin{nn}; switch request case "wjacdet" # Weighted Jacobian determinant - b = wjacdet(x1,y1,z1,\ - x2,y2,z2,\ - x3,y3,z3,\ + b = wjacdet(x1,y1,z1,... + x2,y2,z2,... + x3,y3,z3,... x4,y4,z4); varargout{nn} = b; clear b case "area" # Element area - tmp = wjacdet(x1,y1,z1,\ - x2,y2,z2,\ - x3,y3,z3,\ + tmp = wjacdet(x1,y1,z1,... + x2,y2,z2,... + x3,y3,z3,... x4,y4,z4); b = sum(tmp,1); varargout{nn} = b; case "shg" # Gradient of shape functions - b = shg(x1,y1,z1,\ - x2,y2,z2,\ - x3,y3,z3,\ + b = shg(x1,y1,z1,... + x2,y2,z2,... + x3,y3,z3,... x4,y4,z4); varargout{nn} = b; clear b
--- a/extra/ocs/inst/asm/asm_build_system.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/ocs/inst/asm/asm_build_system.m Wed Aug 28 20:24:54 2013 +0000 @@ -64,7 +64,7 @@ ## Evaluate element if instruct.NLC(ibl).nintvar(iel) - intvars = instruct.totextvar+instruct.NLC(ibl).osintvar(iel) + \ + intvars = instruct.totextvar+instruct.NLC(ibl).osintvar(iel) + ... [1:instruct.NLC(ibl).nintvar(iel)]'; else intvars=[]; @@ -78,10 +78,10 @@ z = x(intvars); - [a,b,c] = feval(instruct.NLC(ibl).func,\ - instruct.NLC(ibl).section,\ - instruct.NLC(ibl).pvmatrix(iel,:),\ - instruct.NLC(ibl).parnames,\ + [a,b,c] = feval(instruct.NLC(ibl).func,... + instruct.NLC(ibl).section,... + instruct.NLC(ibl).pvmatrix(iel,:),... + instruct.NLC(ibl).parnames,... y,z,t); ## Assemble matrices
--- a/extra/ocs/inst/nls/nls_newton_raphson.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/ocs/inst/nls/nls_newton_raphson.m Wed Aug 28 20:24:54 2013 +0000 @@ -47,7 +47,7 @@ ## @seealso{nls_stationary,tst_backward_euler,tst_theta_method,tst_daspk,tst_odepkg} ## @end deftypefn -function [y,ii,resnrm] = nls_newton_raphson(y0,RES,JAC,tol,maxit,\ +function [y,ii,resnrm] = nls_newton_raphson(y0,RES,JAC,tol,maxit,... verbosity,update); ## Check input
--- a/extra/ocs/inst/prs/prs_iff.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/ocs/inst/prs/prs_iff.m Wed Aug 28 20:24:54 2013 +0000 @@ -76,8 +76,8 @@ ## Initialization version ="0.1b1"; - outstruct = struct("NLC",[],\ - "LCR",[],\ + outstruct = struct("NLC",[],... + "LCR",[],... "totextvar",0); ## Open cir file @@ -120,7 +120,7 @@ ## parse NLC block [outstruct,intvar] = parseNLCblock(fid,line,outstruct,NLCcount,intvar); - ndsvec = [ndsvec ; \ + ndsvec = [ndsvec ; ... outstruct.NLC(NLCcount).vnmatrix(:)]; ## skip the newline char after the matrix @@ -151,7 +151,7 @@ ## parse block header [outstruct,intvar] = parseLCRblock(fid,line,outstruct,LCRcount,intvar); - ndsvec = [ndsvec ; \ + ndsvec = [ndsvec ; ... outstruct.LCR(LCRcount).vnmatrix(:)]; ## skip the newline char after the matrix @@ -250,7 +250,7 @@ ## Compute internal variables cycling over each ## element in the section for iel = 1:nrows - [a,b,c] = feval(func,section,outstruct.NLC(NLCcount).pvmatrix(iel,:),\ + [a,b,c] = feval(func,section,outstruct.NLC(NLCcount).pvmatrix(iel,:),... outstruct.NLC(NLCcount).parnames,zeros(nextvar,1),[],0); ## FIXME: if all the element in the same section share the @@ -297,7 +297,7 @@ ## Compute internal variables cycling over each ## element in the section for iel = 1:nrows - [a,b,c] = feval(func,section,outstruct.LCR(LCRcount).pvmatrix(iel,:),\ + [a,b,c] = feval(func,section,outstruct.LCR(LCRcount).pvmatrix(iel,:),... outstruct.LCR(LCRcount).parnames,zeros(nextvar,1),[],0); ## FIXME: if all the element in the same section share the
--- a/extra/ocs/inst/sbn/Mcurrentsources.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/ocs/inst/sbn/Mcurrentsources.m Wed Aug 28 20:24:54 2013 +0000 @@ -81,9 +81,9 @@ endfor a = zeros(4); - b = [0 0 K -K;\ - 0 0 -K K;\ - 0 0 0 0;\ + b = [0 0 K -K;... + 0 0 -K K;... + 0 0 0 0;... 0 0 0 0]; c = zeros(4,1); ## NLC part @@ -110,9 +110,9 @@ dIdv = 2*K*dv; a = zeros(4); - b = [0 0 dIdv -dIdv;\ - 0 0 -dIdv dIdv;\ - 0 0 0 0;\ + b = [0 0 dIdv -dIdv;... + 0 0 -dIdv dIdv;... + 0 0 0 0;... 0 0 0 0]; c = [I -I 0 0];
--- a/extra/ocs/inst/sbn/Mshichmanhodgesmosfet.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/ocs/inst/sbn/Mshichmanhodgesmosfet.m Wed Aug 28 20:24:54 2013 +0000 @@ -84,7 +84,7 @@ num2str(parameters(ii)) " ;"]) endfor - [gm,gd,ids,didT,P,dPdT,dPdvgs,dPdvds] = \ + [gm,gd,ids,didT,P,dPdT,dPdvgs,dPdvds] = ... nmos(extvar,mu0,Cox,W,L,Vth,rd,Tshift); vg = extvar(1); @@ -104,26 +104,26 @@ Qdb = intvar(5); a11 = a21 = a22 = zeros(5,5); - a12 = [ 1 1 1 0 0; \ - 0 -1 0 1 0; \ - 0 0 -1 0 1; \ - -1 0 0 -1 -1; \ + a12 = [ 1 1 1 0 0; ... + 0 -1 0 1 0; ... + 0 0 -1 0 1; ... + -1 0 0 -1 -1; ... 0 0 0 0 0]; a = [a11 a12; a21 a22]; - b11 = [0 0 0 0 0; \ - -gm (gm+gd) -gd 0 -didT; \ - gm -(gm+gd) gd 0 didT; \ - 0 0 0 0 0; \ + b11 = [0 0 0 0 0; ... + -gm (gm+gd) -gd 0 -didT; ... + gm -(gm+gd) gd 0 didT; ... + 0 0 0 0 0; ... dPdvgs -(dPdvgs+dPdvds) dPdvds 0 dPdT]; b12 = zeros(5,5); - b21 = [Cgb 0 0 -Cgb 0; \ - Cgs -Cgs 0 0 0; \ - Cgd 0 -Cgd 0 0; \ - 0 Csb 0 -Csb 0; \ + b21 = [Cgb 0 0 -Cgb 0; ... + Cgs -Cgs 0 0 0; ... + Cgd 0 -Cgd 0 0; ... + 0 Csb 0 -Csb 0; ... 0 0 Cdb -Cdb 0]; b22 = -eye(5); @@ -132,10 +132,10 @@ c1 = [0; -ids; ids; 0; P]; - c2 = [Cgb*(vg - vb) - Qgb;\ - Cgs*(vg - vs) - Qgs;\ - Cgd*(vg - vd) - Qgd;\ - Csb*(vs - vb) - Qsb;\ + c2 = [Cgb*(vg - vb) - Qgb;... + Cgs*(vg - vs) - Qgs;... + Cgd*(vg - vd) - Qgd;... + Csb*(vs - vb) - Qsb;... Cdb*(vd - vb) - Qdb]; c = [c1;c2]; @@ -160,7 +160,7 @@ num2str(parameters(ii)) " ;"]) endfor - [gm,gd,ids,didT,P,dPdT,dPdvgs,dPdvds] = \ + [gm,gd,ids,didT,P,dPdT,dPdvgs,dPdvds] = ... pmos(extvar,mu0,Cox,W,L,Vth,rd,Tshift); @@ -181,26 +181,26 @@ Qdb = intvar(5); a11 = a21 = a22 = zeros(5,5); - a12 = [ 1 1 1 0 0; \ - 0 -1 0 1 0; \ - 0 0 -1 0 1; \ - -1 0 0 -1 -1; \ + a12 = [ 1 1 1 0 0; ... + 0 -1 0 1 0; ... + 0 0 -1 0 1; ... + -1 0 0 -1 -1; ... 0 0 0 0 0]; a = [a11 a12; a21 a22]; - b11 = [0 0 0 0 0; \ - -gm (gm+gd) -gd 0 -didT; \ - gm -(gm+gd) gd 0 didT; \ - 0 0 0 0 0; \ + b11 = [0 0 0 0 0; ... + -gm (gm+gd) -gd 0 -didT; ... + gm -(gm+gd) gd 0 didT; ... + 0 0 0 0 0; ... dPdvgs -(dPdvgs+dPdvds) dPdvds 0 dPdT]; b12 = zeros(5,5); - b21 = [Cgb 0 0 -Cgb 0; \ - Cgs -Cgs 0 0 0; \ - Cgd 0 -Cgd 0 0; \ - 0 Csb 0 -Csb 0; \ + b21 = [Cgb 0 0 -Cgb 0; ... + Cgs -Cgs 0 0 0; ... + Cgd 0 -Cgd 0 0; ... + 0 Csb 0 -Csb 0; ... 0 0 Cdb -Cdb 0]; b22 = -eye(5); @@ -210,10 +210,10 @@ c1 = [0; -ids; ids; 0; P]; - c2 = [Cgb*(vg - vb) - Qgb;\ - Cgs*(vg - vs) - Qgs;\ - Cgd*(vg - vd) - Qgd;\ - Csb*(vs - vb) - Qsb;\ + c2 = [Cgb*(vg - vb) - Qgb;... + Cgs*(vg - vs) - Qgs;... + Cgd*(vg - vd) - Qgd;... + Csb*(vs - vb) - Qsb;... Cdb*(vd - vb) - Qdb]; c = [c1;c2];
--- a/extra/ocs/inst/tst/tst_odepkg.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/ocs/inst/tst/tst_odepkg.m Wed Aug 28 20:24:54 2013 +0000 @@ -61,7 +61,7 @@ ## ## @end deftypefn -function [out, tout] = tst_odepkg (outstruct,x,t,tol,maxit,\ +function [out, tout] = tst_odepkg (outstruct,x,t,tol,maxit,... pltvars,solver,verbosity,odestruct) ## Check input
--- a/extra/ocs/inst/tst/tst_theta_method.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/ocs/inst/tst/tst_theta_method.m Wed Aug 28 20:24:54 2013 +0000 @@ -56,7 +56,7 @@ ## ## @end deftypefn -function [out, varargout] = tst_theta_method(outstruct,x,t,tol,maxit,\ +function [out, varargout] = tst_theta_method(outstruct,x,t,tol,maxit,... theta,pltvars,verbosity) ## Check input @@ -108,8 +108,8 @@ resold, theta, A1, Jac, res); UPDT = @(x) TSTTHETAFUNUP1 (outstruct, x, t(it)); - [out(:,it),ii,resnrm] = nls_newton_raphson(out(:,it-1),RES,JAC,\ - tol, maxit,verbosity(1),\ + [out(:,it),ii,resnrm] = nls_newton_raphson(out(:,it-1),RES,JAC,... + tol, maxit,verbosity(1),... UPDT); if nargout > 1 @@ -159,4 +159,4 @@ [A1,Jac,res] = asm_build_system(outstruct,x,t1); update = {A1,Jac,res}; -endfunction \ No newline at end of file +endfunction
--- a/extra/pdb/inst/write_pdb.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/pdb/inst/write_pdb.m Wed Aug 28 20:24:54 2013 +0000 @@ -104,7 +104,7 @@ # Print the Crystallographic and Coordinate Transformation Section -if( isfield(p, "cellsize") || isfield(p, "cellangl") \ +if( isfield(p, "cellsize") || isfield(p, "cellangl") ... || isfield(p, "sgroup") || isfield(p, "z") ) if(isfield(p, "cellsize")) cellsize = p.cellsize; @@ -128,7 +128,7 @@ endif buf = blanks(80); buf(1:6) = "CRYST1"; - buf(7:54) = sprintf(" %8.3f %8.3f %8.3f %6.2f %6.2f %6.2f", \ + buf(7:54) = sprintf(" %8.3f %8.3f %8.3f %6.2f %6.2f %6.2f", ... cellsize, cellangl); buf(56:66) = sprintf("%-11s", sgroup); buf(67:70) = sprintf("%4d", z);
--- a/extra/secs1d/bak/DDG/DDGgummelmap.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/secs1d/bak/DDG/DDGgummelmap.m Wed Aug 28 20:24:54 2013 +0000 @@ -84,13 +84,13 @@ fprintf(1,"solving non linear poisson equation\n\n"); endif - [vout(:,2),electron_density(:,2),hole_density(:,2)] =\ + [vout(:,2),electron_density(:,2),hole_density(:,2)] =... DDGnlpoisson (x,[1:Nnodes],vout(:,1),electron_density(:,1),hole_density(:,1),fermin(:,1),fermip(:,1),D,idata.l2,ptoll,pmaxit,verbose); if (verbose>1) fprintf (1,"\n\nupdating electron qfl\n\n"); endif - electron_density(:,3)=\ + electron_density(:,3)=... DDGelectron_driftdiffusion(vout(:,2), x, electron_density(:,2),hole_density(:,2),idata.nis,idata.tn,idata.tp,idata.un); fermin(:,2) = DDGn2phin(vout(:,2),electron_density(:,3)); @@ -101,7 +101,7 @@ fprintf(1,"updating hole qfl\n\n"); endif - hole_density(:,3) = \ + hole_density(:,3) = ... DDGhole_driftdiffusion(vout(:,2), x, hole_density(:,2),electron_density(:,2),idata.nis,idata.tn,idata.tp,idata.up); fermip(:,2) = DDGp2phip(vout(:,2),hole_density(:,3));
--- a/extra/secs2d/inst/DDGOX/DDGOXgummelmap.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/secs2d/inst/DDGOX/DDGOXgummelmap.m Wed Aug 28 20:24:54 2013 +0000 @@ -65,27 +65,27 @@ if (verbose>=1) fprintf(1,"solving non linear poisson equation\n"); if ((i>1)&(verbose>1)) - DDGOXplotresults(imesh,Simesh,n(:,1)*idata.ns,p(:,1)*idata.ns,V(:,1)*idata.Vs,\ + DDGOXplotresults(imesh,Simesh,n(:,1)*idata.ns,p(:,1)*idata.ns,V(:,1)*idata.Vs,... Fn(:,1)*idata.Vs,Fp(:,1)*idata.Vs,i,nrm(end),"poisson"); endif endif - [V(:,2),n(:,2),p(:,2)] = DDGOXnlpoisson (imesh,Dsides,Sinodes,SiDnodes,Sielements,\ - V(:,1),n(:,1),p(:,1),Fn(:,1),Fp(:,1),D,\ + [V(:,2),n(:,2),p(:,2)] = DDGOXnlpoisson (imesh,Dsides,Sinodes,SiDnodes,Sielements,... + V(:,1),n(:,1),p(:,1),Fn(:,1),Fp(:,1),D,... idata.l2,idata.l2ox,ptoll,pmaxit,verbose-1); V(Dnodes,2) = idata.V(Dnodes); if (verbose>=1) fprintf (1,"***\nupdating electron qfl\n"); if ((i>1)&(verbose>1)) - DDGOXplotresults(imesh,Simesh,n(:,2)*idata.ns,p(:,2)*idata.ns,\ + DDGOXplotresults(imesh,Simesh,n(:,2)*idata.ns,p(:,2)*idata.ns,... V(:,2)*idata.Vs,Fn(:,1)*idata.Vs,Fp(:,1)*idata.Vs,i,nrm(end),"e- continuity"); endif endif mob = Ufielddepmob(Simesh,idata.un,Fn(:,1),idata.vsatn,idata.mubn); - n(:,3) = DDGOXelectron_driftdiffusion(Simesh,SiDsides,n(:,2),p(:,2),\ - V(Sinodes,2),mob,\ + n(:,3) = DDGOXelectron_driftdiffusion(Simesh,SiDsides,n(:,2),p(:,2),... + V(Sinodes,2),mob,... idata.tn,idata.tp,idata.ni,idata.ni); Fn(:,2) = V(Sinodes,2) - log(n(:,3)); n(SiDnodes,3) = idata.n(SiDnodes); @@ -106,14 +106,14 @@ if (verbose>=1) fprintf(1,"***\nupdating hole qfl\n"); if ((i>1)&(verbose>1)) - DDGOXplotresults(imesh,Simesh,n(:,3)*idata.ns,p(:,2)*idata.ns,V(:,2)*idata.Vs,\ + DDGOXplotresults(imesh,Simesh,n(:,3)*idata.ns,p(:,2)*idata.ns,V(:,2)*idata.Vs,... Fn(:,2)*idata.Vs,Fp(:,1)*idata.Vs,i,nrm(end),"h+ continuity"); endif endif mob = Ufielddepmob(Simesh,idata.up,Fp(:,1),idata.vsatp,idata.mubp); - p(:,3) = DDGOXhole_driftdiffusion(Simesh,SiDsides,n(:,3),p(:,2),\ - V(Sinodes,2),mob,\ + p(:,3) = DDGOXhole_driftdiffusion(Simesh,SiDsides,n(:,3),p(:,2),... + V(Sinodes,2),mob,... idata.tn,idata.tp,idata.ni,idata.ni); Fp(:,2) = V(Sinodes,2) + log(p(:,3)); p(SiDnodes,3) = idata.p(SiDnodes);
--- a/extra/secs2d/inst/DDGOXT/DDGOXTgummelmap.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/secs2d/inst/DDGOXT/DDGOXTgummelmap.m Wed Aug 28 20:24:54 2013 +0000 @@ -71,8 +71,8 @@ fprintf(1,"solving non linear poisson equation\n"); endif - [V(:,2),n(:,2),p(:,2)] = DDGOXnlpoisson (imesh,Dsides,Sinodes,SiDnodes,Sielements,\ - V(:,1),n(:,1),p(:,1),Fn(:,1),Fp(:,1),D,\ + [V(:,2),n(:,2),p(:,2)] = DDGOXnlpoisson (imesh,Dsides,Sinodes,SiDnodes,Sielements,... + V(:,1),n(:,1),p(:,1),Fn(:,1),Fp(:,1),D,... idata.l2,idata.l2ox,ptoll,pmaxit,verbose-1); V(Dnodes,2) = idata.V(Dnodes); @@ -81,8 +81,8 @@ endif mob = Ufielddepmob(Simesh,idata.un,Fn(:,1),idata.vsatn,idata.mubn); - n(:,3) = DDGOXTelectron_driftdiffusion(Simesh,SiDsides,[n(:,2),nold],[p(:,2),pold],\ - V(Sinodes,2),mob,\ + n(:,3) = DDGOXTelectron_driftdiffusion(Simesh,SiDsides,[n(:,2),nold],[p(:,2),pold],... + V(Sinodes,2),mob,... idata.tn,idata.tp,idata.ni,idata.ni,weight); Fn(:,2) = V(Sinodes,2) - log(n(:,3)); @@ -105,8 +105,8 @@ endif mob = Ufielddepmob(Simesh,idata.up,Fp(:,1),idata.vsatp,idata.mubp); - p(:,3) = DDGOXThole_driftdiffusion(Simesh,SiDsides,[n(:,3),nold],[p(:,2),pold],\ - V(Sinodes,2),mob,\ + p(:,3) = DDGOXThole_driftdiffusion(Simesh,SiDsides,[n(:,3),nold],[p(:,2),pold],... + V(Sinodes,2),mob,... idata.tn,idata.tp,idata.ni,idata.ni,weight); Fp(:,2) = V(Sinodes,2) + log(p(:,3));
--- a/extra/secs2d/inst/QDDGOX/QDDGOXcompdens.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/secs2d/inst/QDDGOX/QDDGOXcompdens.m Wed Aug 28 20:24:54 2013 +0000 @@ -84,7 +84,7 @@ converged = 0; for jnewt =1:ceil(maxit/VErank) for k=1:VErank - [w(:,k+1),converged,G,L,Bmat] = \ + [w(:,k+1),converged,G,L,Bmat] = ... onenewtit(w(:,k),G,fermiin,vin,L,Bmat,jnewt,mesh,Dnodes,Varnodes,Dvals,Nnodes,Nelements,toll); if converged break
--- a/extra/secs2d/inst/QDDGOX/QDDGOXgummelmap.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/secs2d/inst/QDDGOX/QDDGOXgummelmap.m Wed Aug 28 20:24:54 2013 +0000 @@ -130,8 +130,8 @@ fprintf(1,"solving non linear poisson equation\n\n"); endif - [V(:,3),n(:,2),p(:,2)] = QDDGOXnlpoisson (imesh,Dsides,Sinodes,[SiDnodes,Intnodes] ,Sielements,\ - V(:,2),n(:,1),p(:,1),Fn(:,1),Fp(:,1),G(:,2)+FDn,Gp(:,2)+FDp,D,\ + [V(:,3),n(:,2),p(:,2)] = QDDGOXnlpoisson (imesh,Dsides,Sinodes,[SiDnodes,Intnodes] ,Sielements,... + V(:,2),n(:,1),p(:,1),Fn(:,1),Fp(:,1),G(:,2)+FDn,Gp(:,2)+FDp,D,... idata.l2,idata.l2ox,ptoll,pmaxit,verbose-1); n([SiDnodes,Intnodes],2) = idata.n([SiDnodes,Intnodes]); p([SiDnodes,Intnodes],2) = idata.p([SiDnodes,Intnodes]); @@ -152,7 +152,7 @@ if (options.holes==1) p(Intnodes,2) = idata.p(Intnodes); - wp = QDDGOXcompdens(Simesh,[SiDsides,Intsides],sqrt(p(:,2)),-V(Sinodes,3) - FDp,\ + wp = QDDGOXcompdens(Simesh,[SiDsides,Intsides],sqrt(p(:,2)),-V(Sinodes,3) - FDp,... -Fp(:,1),idata.dp2,ptoll,pmaxit,verbose-1); p(:,2) = wp.^2; @@ -177,8 +177,8 @@ FDp(SiDnodes) = idata.FDp(SiDnodes); endif - bohmdeltav = norm(G(:,3)-G(:,2),inf) +\ - norm(Gp(:,3)-Gp(:,2),inf) +\ + bohmdeltav = norm(G(:,3)-G(:,2),inf) +... + norm(Gp(:,3)-Gp(:,2),inf) +... norm(V(:,3)-V(:,2),inf); @@ -207,10 +207,10 @@ fprintf (1,"\n\nupdating electron qfl\n\n"); endif - mob = Ufielddepmob(Simesh,idata.un,Fn(:,1), \ + mob = Ufielddepmob(Simesh,idata.un,Fn(:,1), ... idata.vsatn,idata.mubn); - n(:,3) = DDGOXelectron_driftdiffusion(Simesh,SiDsides,n(:,2),p(:,2),\ - V(Sinodes,3)+G(:,3)+FDn,mob,\ + n(:,3) = DDGOXelectron_driftdiffusion(Simesh,SiDsides,n(:,2),p(:,2),... + V(Sinodes,3)+G(:,3)+FDn,mob,... tn,tp,idata.n0,idata.p0); @@ -231,8 +231,8 @@ endif mob = Ufielddepmob(Simesh,idata.up,Fp(:,1),idata.vsatp,idata.mubp); - p(:,3) = DDGOXhole_driftdiffusion(Simesh,SiDsides,n(:,3),p(:,2),\ - V(Sinodes,3)+Gp(:,3)+FDp,mob,\ + p(:,3) = DDGOXhole_driftdiffusion(Simesh,SiDsides,n(:,3),p(:,2),... + V(Sinodes,3)+Gp(:,3)+FDp,mob,... tn,tp,idata.n0,idata.p0);
--- a/extra/secs2d/inst/ThDDGOX/ThDDGOXeletiteration.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/secs2d/inst/ThDDGOX/ThDDGOXeletiteration.m Wed Aug 28 20:24:54 2013 +0000 @@ -65,9 +65,9 @@ Fnshift = log(idata.ni) .* (1-Tn); Fpshift = -log(idata.ni) .* (1-Tp); - [V(:,2),n(:,2),p(:,2)] = ThDDGOXnlpoisson (imesh,Dsides,Sinodes,SiDnodes,Sielements,\ - V(:,1),Tn,Tp,\ - n(:,1),p(:,1),Fn(:,1)+Fnshift,Fp(:,1)+Fpshift,D,\ + [V(:,2),n(:,2),p(:,2)] = ThDDGOXnlpoisson (imesh,Dsides,Sinodes,SiDnodes,Sielements,... + V(:,1),Tn,Tp,... + n(:,1),p(:,1),Fn(:,1)+Fnshift,Fp(:,1)+Fpshift,D,... idata.l2,idata.l2ox,ptoll,pmaxit,verbose-1); V(Dnodes,2) = idata.V(Dnodes); @@ -82,8 +82,8 @@ mobp0 = idata.mobp0(imesh,Simesh,Sinodes,Sielements,odata); mobn1 = idata.mobn1(imesh,Simesh,Sinodes,Sielements,odata); mobp1 = idata.mobp1(imesh,Simesh,Sinodes,Sielements,odata); - n(:,3) = ThDDGOXelectron_driftdiffusion(Simesh,SiDnodes,n(:,2),p(:,2),\ - V(Sinodes,2),Tn,mobn0,mobn1,\ + n(:,3) = ThDDGOXelectron_driftdiffusion(Simesh,SiDnodes,n(:,2),p(:,2),... + V(Sinodes,2),Tn,mobn0,mobn1,... idata.tn,idata.tp,idata.ni,idata.ni); Fn(:,2) = V(Sinodes,2) - Tn .* log(n(:,3)) - Fnshift; @@ -95,8 +95,8 @@ fprintf(1,"\t***\tupdating hole qfl\n"); endif - p(:,3) = ThDDGOXhole_driftdiffusion(Simesh,SiDnodes,n(:,3),p(:,2),\ - V(Sinodes,2),Tp,mobp0,mobp1,\ + p(:,3) = ThDDGOXhole_driftdiffusion(Simesh,SiDnodes,n(:,3),p(:,2),... + V(Sinodes,2),Tp,mobp0,mobp1,... idata.tn,idata.tp,idata.ni,idata.ni); Fp(:,2) = V(Sinodes,2) + Tp .* log(p(:,3)) - Fpshift;
--- a/extra/secs2d/inst/ThDDGOX/ThDDGOXgummelmap.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/secs2d/inst/ThDDGOX/ThDDGOXgummelmap.m Wed Aug 28 20:24:54 2013 +0000 @@ -50,8 +50,8 @@ fprintf(1,"\n***\n***\tupdating potentials\n***\n"); endif - [eletdata,innrm1]=ThDDGOXeletiteration(imesh,Dsides,\ - Simesh,Sinodes,Sielements,SiDsides,\ + [eletdata,innrm1]=ThDDGOXeletiteration(imesh,Dsides,... + Simesh,Sinodes,Sielements,SiDsides,... eletdata,eltol,elmaxit,ptol,pmaxit,verbose); eletnrm = [eletnrm,innrm1]; thermdata.n = eletdata.n; @@ -62,8 +62,8 @@ fprintf(1,"\n***\n***\tupdating temperatures\n***\n"); endif - [thermdata,innrm] = ThDDGOXthermaliteration(imesh,Dsides,\ - Simesh,Sinodes,Sielements,SiDsides,\ + [thermdata,innrm] = ThDDGOXthermaliteration(imesh,Dsides,... + Simesh,Sinodes,Sielements,SiDsides,... thermdata,thtol,thmaxit,2);
--- a/extra/secs2d/inst/ThDDGOX/ThDDGOXthermaliteration.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/secs2d/inst/ThDDGOX/ThDDGOXthermaliteration.m Wed Aug 28 20:24:54 2013 +0000 @@ -55,9 +55,9 @@ [Ex,Ey] = Updegrad(Simesh,-thermdata.V(Sinodes)); E = [Ex;Ey]; - [jnx,jny] = Ufvsgcurrent3(Simesh,thermdata.n,\ + [jnx,jny] = Ufvsgcurrent3(Simesh,thermdata.n,... mobn0,mobn1,Tn,thermdata.V(Sinodes)-Tn); - [jpx,jpy] = Ufvsgcurrent3(Simesh,thermdata.p,\ + [jpx,jpy] = Ufvsgcurrent3(Simesh,thermdata.p,... -mobp0,mobp1,Tp,-thermdata.V(Sinodes)-Tp); Jn = [jnx;jny]; @@ -73,10 +73,10 @@ fprintf(1,"\t***updating electron temperature\n"); endif - Tn = ThDDGOXupdateelectron_temp(Simesh,SiDnodes,thermdata.Tn,\ - thermdata.n,thermdata.p,\ - thermdata.Tl,Jn,E,mobn0,\ - twn0,twn1,thermdata.tn,thermdata.tp,\ + Tn = ThDDGOXupdateelectron_temp(Simesh,SiDnodes,thermdata.Tn,... + thermdata.n,thermdata.p,... + thermdata.Tl,Jn,E,mobn0,... + twn0,twn1,thermdata.tn,thermdata.tp,... thermdata.ni,thermdata.ni); dtn = norm(Tn-thermdata.Tn,inf); if (dtn>0) @@ -88,10 +88,10 @@ fprintf(1,"\t***updating hole temperature\n"); endif - Tp = ThDDGOXupdatehole_temp(Simesh,SiDnodes,thermdata.Tp,\ - thermdata.n,thermdata.p,\ - thermdata.Tl,Jp,E,mobp0,\ - twp0,twp1,thermdata.tn,thermdata.tp,\ + Tp = ThDDGOXupdatehole_temp(Simesh,SiDnodes,thermdata.Tp,... + thermdata.n,thermdata.p,... + thermdata.Tl,Jp,E,mobp0,... + twp0,twp1,thermdata.tn,thermdata.tp,... thermdata.ni,thermdata.ni); dtp = norm(Tp-thermdata.Tp,inf); @@ -119,11 +119,11 @@ endif endif - Tl = ThDDGOXupdatelattice_temp(Simesh,SiDnodes,thermdata.Tl,\ - Tn,Tp,thermdata.n,\ - thermdata.p,thermdata.kappa,thermdata.Egap,\ - thermdata.tn,thermdata.tp,twn0,\ - twp0,twn1,twp1,\ + Tl = ThDDGOXupdatelattice_temp(Simesh,SiDnodes,thermdata.Tl,... + Tn,Tp,thermdata.n,... + thermdata.p,thermdata.kappa,thermdata.Egap,... + thermdata.tn,thermdata.tp,twn0,... + twp0,twn1,twp1,... thermdata.ni,thermdata.ni); dtl = norm(Tl-thermdata.Tl,inf);
--- a/extra/secs2d/inst/Utilities/Udopdepmob.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/secs2d/inst/Utilities/Udopdepmob.m Wed Aug 28 20:24:54 2013 +0000 @@ -29,8 +29,8 @@ function mob=Udopdepmob (mesh,mu,par,D); NI = sum(D(mesh.t(1:3,:)),1)'/3; - mob = par(1)*exp(-par(4)./NI) \ - + (mu-par(2))./(1+(NI/par(5)).^par(7)) \ + mob = par(1)*exp(-par(4)./NI) ... + + (mu-par(2))./(1+(NI/par(5)).^par(7)) ... - par(3)./(1+(par(6)./NI).^par(8)); endfunction \ No newline at end of file
--- a/extra/tk_octave/inst/tk_dialog.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/tk_octave/inst/tk_dialog.m Wed Aug 28 20:24:54 2013 +0000 @@ -45,8 +45,8 @@ return endif -if (!(strcmp(bitmap, "error") || strcmp(bitmap, "hourglass") || \ - strcmp(bitmap, "info") || strcmp(bitmap, "questhead") || \ +if (!(strcmp(bitmap, "error") || strcmp(bitmap, "hourglass") || ... + strcmp(bitmap, "info") || strcmp(bitmap, "questhead") || ... strcmp(bitmap, "question") || strcmp(bitmap, "warning"))) error("'bitmap' must be one of 'error', 'hourglass', 'info', \ 'questhead', 'question', 'warning'");
--- a/extra/tk_octave/inst/tk_scale.m Wed Aug 28 17:34:48 2013 +0000 +++ b/extra/tk_octave/inst/tk_scale.m Wed Aug 28 20:24:54 2013 +0000 @@ -62,7 +62,7 @@ tk_cmd( sprintf("set val_%d %f", i, val) ); tk_cmd( sprintf("scale .master.s%d -from %f -to %f \ -resolution %f -label {%s} -variable val_%d \ - -showvalue 1", \ + -showvalue 1", ... i, min_val, max_val, inc_val, desc, i) ); tk_cmd( sprintf("pack .master.s%d -side left", i) );
--- a/main/audio/inst/auload.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/audio/inst/auload.m Wed Aug 28 20:24:54 2013 +0000 @@ -343,22 +343,22 @@ ## convert samples into range [-1, 1) if strcmp(sampleformat, 'alaw') - alaw = [ \ - -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736, \ - -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784, \ - -2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368, \ - -3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392, \ - -22016, -20992, -24064, -23040, -17920, -16896, -19968, -18944, \ - -30208, -29184, -32256, -31232, -26112, -25088, -28160, -27136, \ - -11008, -10496, -12032, -11520, -8960, -8448, -9984, -9472, \ - -15104, -14592, -16128, -15616, -13056, -12544, -14080, -13568, \ - -344, -328, -376, -360, -280, -264, -312, -296, \ - -472, -456, -504, -488, -408, -392, -440, -424, \ - -88, -72, -120, -104, -24, -8, -56, -40, \ - -216, -200, -248, -232, -152, -136, -184, -168, \ - -1376, -1312, -1504, -1440, -1120, -1056, -1248, -1184, \ - -1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696, \ - -688, -656, -752, -720, -560, -528, -624, -592, \ + alaw = [ ... + -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736, ... + -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784, ... + -2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368, ... + -3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392, ... + -22016, -20992, -24064, -23040, -17920, -16896, -19968, -18944, ... + -30208, -29184, -32256, -31232, -26112, -25088, -28160, -27136, ... + -11008, -10496, -12032, -11520, -8960, -8448, -9984, -9472, ... + -15104, -14592, -16128, -15616, -13056, -12544, -14080, -13568, ... + -344, -328, -376, -360, -280, -264, -312, -296, ... + -472, -456, -504, -488, -408, -392, -440, -424, ... + -88, -72, -120, -104, -24, -8, -56, -40, ... + -216, -200, -248, -232, -152, -136, -184, -168, ... + -1376, -1312, -1504, -1440, -1120, -1056, -1248, -1184, ... + -1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696, ... + -688, -656, -752, -720, -560, -528, -624, -592, ... -944, -912, -1008, -976, -816, -784, -880, -848 ]; alaw = ([ alaw,-alaw]+0.5)/32767.5; data = alaw(data+1);
--- a/main/audio/inst/auplot.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/audio/inst/auplot.m Wed Aug 28 20:24:54 2013 +0000 @@ -130,7 +130,7 @@ head=reshape(x(1:r*c,chan),r,c); if hastail tail=x(r*c+1:samples,chan); - y(:,chan)=[max(head), max(tail), min(tail), \ + y(:,chan)=[max(head), max(tail), min(tail), ... fliplr(min(head)), max(head(:,1))]'; else y(:,chan)=[max(head), fliplr(min(head)), max(head(:,1))]';
--- a/main/comm/inst/huffmandict.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/comm/inst/huffmandict.m Wed Aug 28 20:24:54 2013 +0000 @@ -136,7 +136,7 @@ %first-position (greedy?) possible. % for i=1:(L-2) - if((minvar && stage_curr.prob_list(i)<=nprob) || \ + if((minvar && stage_curr.prob_list(i)<=nprob) || ... stage_curr.prob_list(i) < nprob) break; end
--- a/main/database/inst/pq_connect.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/database/inst/pq_connect.m Wed Aug 28 20:24:54 2013 +0000 @@ -57,25 +57,25 @@ endif if (ischar (settings) && strcmp (settings, "defaults")) - conn = setdbopts ("host", [], \ - "hostaddr", [], \ - "port", [], \ - "dbname", [], \ - "user", [], \ - "password", [], \ - "connect_timeout", [], \ - "options", [], \ - "sslmode", [], \ - "sslcert", [], \ - "sslkey", [], \ - "sslrootcert", [], \ - "sslcrl", [], \ - "krbsrvname", [], \ + conn = setdbopts ("host", [], ... + "hostaddr", [], ... + "port", [], ... + "dbname", [], ... + "user", [], ... + "password", [], ... + "connect_timeout", [], ... + "options", [], ... + "sslmode", [], ... + "sslcert", [], ... + "sslkey", [], ... + "sslrootcert", [], ... + "sslcrl", [], ... + "krbsrvname", [], ... "service", []); return; endif - if (! isempty (to = getdbopts (settings, "connect_timeout")) && \ + if (! isempty (to = getdbopts (settings, "connect_timeout")) && ... isnumeric (to)) settings = setdbopts (settings, "connect_timeout", num2str (to)); endif
--- a/main/database/inst/pq_exec_params.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/database/inst/pq_exec_params.m Wed Aug 28 20:24:54 2013 +0000 @@ -266,12 +266,12 @@ if (nargs == 1 && ischar (conn) && strcmp (conn, "defaults")) - ret = setdbopts ("param_types", [], \ - "copy_in_path", "", \ - "copy_out_path", "", \ - "copy_in_data", [], \ - "copy_in_with_oids", false, \ - "copy_in_types", [], \ + ret = setdbopts ("param_types", [], ... + "copy_in_path", "", ... + "copy_out_path", "", ... + "copy_in_data", [], ... + "copy_in_with_oids", false, ... + "copy_in_types", [], ... "copy_in_from_variable", false); else
--- a/main/general/inst/adresamp2.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/general/inst/adresamp2.m Wed Aug 28 20:24:54 2013 +0000 @@ -24,7 +24,7 @@ ## Author : Jaroslav Hajek <highegg@gmail.com> function [xs, ys] = adresamp2 (x, y, n, eps) - if (! isvector (x) || ! size_equal (x, y) || ! isscalar (n) \ + if (! isvector (x) || ! size_equal (x, y) || ! isscalar (n) ... || ! isscalar (eps)) print_usage (); endif
--- a/main/io/inst/append_save.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/io/inst/append_save.m Wed Aug 28 20:24:54 2013 +0000 @@ -71,8 +71,8 @@ env1 = who; - eval([ "load -force ", \ - option, " ", \ + eval([ "load -force ", ... + option, " ", ... filename ] ); env2 = who; @@ -158,8 +158,8 @@ ## Finally, save all of the variables into the target file: - eval( [ "save ", \ - option, " ", \ + eval( [ "save ", ... + option, " ", ... filename, " ", var_str; ] ); endfunction
--- a/main/miscellaneous/inst/asci.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/miscellaneous/inst/asci.m Wed Aug 28 20:24:54 2013 +0000 @@ -38,7 +38,7 @@ %# Check number and types of input arguments if (nargin == 0) vcol = 4; - elseif (isnumeric (varargin{1}) && \ + elseif (isnumeric (varargin{1}) && ... isequal (size (varargin{1}), [1, 1])) vcol = floor (varargin{1}); else
--- a/main/nnet/inst/private/__trainlm.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/nnet/inst/private/__trainlm.m Wed Aug 28 20:24:54 2013 +0000 @@ -80,7 +80,7 @@ time = net.trainParam.time; ## parameter checking - checkParameter(epochs,goal,maxFail,minGrad,mu,\ + checkParameter(epochs,goal,maxFail,minGrad,mu,... muInc,muDec,muMax,show,time); ## Constants @@ -136,12 +136,12 @@ endif ## stoping criteria - [stop,currentTime] = stopifnecessary(stop,startTime,perf,goal,\ - iEpochs,epochs,time,normGradX,minGrad,mu,muMax,\ + [stop,currentTime] = stopifnecessary(stop,startTime,perf,goal,... + iEpochs,epochs,time,normGradX,minGrad,mu,muMax,... doValidation,VV,maxFail); ## show train progress - showtrainprogress(show,stop,iEpochs,epochs,time,currentTime, \ + showtrainprogress(show,stop,iEpochs,epochs,time,currentTime,... goal,perf,minGrad,normGradX,shortStr,net); ## show performance plot, if needed @@ -219,7 +219,7 @@ # additional functions # #======================================================= - function checkParameter(epochs,goal,maxFail,minGrad,mu,\ + function checkParameter(epochs,goal,maxFail,minGrad,mu,... muInc, muDec, muMax, show, time) ## Parameter Checking @@ -239,7 +239,7 @@ error("maxFail is not a positive integer.") endif - if (!isa(minGrad,"double")) || (!isreal(minGrad)) || (!isscalar(minGrad)) || \ + if (!isa(minGrad,"double")) || (!isreal(minGrad)) || (!isscalar(minGrad)) || ... (minGrad < 0) error("minGrad is not zero or a positive real value.") end @@ -251,19 +251,19 @@ endif ## muDec defines the decrement factor - if ((!isa(muDec,"double")) || (!isreal(muDec)) || (any(size(muDec)) != 1) || \ + if ((!isa(muDec,"double")) || (!isreal(muDec)) || (any(size(muDec)) != 1) || ... (muDec < 0) || (muDec > 1)) error("muDec is not a real value between 0 and 1.") endif ## muInc defines the increment factor - if (~isa(muInc,"double")) || (!isreal(muInc)) || (any(size(muInc)) != 1) || \ + if (~isa(muInc,"double")) || (!isreal(muInc)) || (any(size(muInc)) != 1) || ... (muInc < 1) error("muInc is not a real value greater than 1.") endif ## muMax is the upper boundary for the mu value - if (!isa(muMax,"double")) || (!isreal(muMax)) || (any(size(muMax)) != 1) || \ + if (!isa(muMax,"double")) || (!isreal(muMax)) || (any(size(muMax)) != 1) || ... (muMax <= 0) error("muMax is not a positive real value.") endif @@ -281,7 +281,7 @@ endif ## check at last the time argument, must be zero or a positive real value - if (!isa(time,"double")) || (!isreal(time)) || (any(size(time)) != 1) || \ + if (!isa(time,"double")) || (!isreal(time)) || (any(size(time)) != 1) || ... (time < 0) error("Time is not zero or a positive real value.") end @@ -292,7 +292,7 @@ # ----------------------------------------------------------------------------- # - function showtrainprogress(show,stop,iEpochs,epochs,time,currentTime, \ + function showtrainprogress(show,stop,iEpochs,epochs,time,currentTime, ... goal,perf,minGrad,normGradX,shortStr,net) ## check number of inputs @@ -325,8 +325,8 @@ # ----------------------------------------------------------------------------- # - function [stop,currentTime] = stopifnecessary(stop,startTime,perf,goal,\ - iEpochs,epochs,time,normGradX,minGrad,mu,muMax,\ + function [stop,currentTime] = stopifnecessary(stop,startTime,perf,goal,... + iEpochs,epochs,time,normGradX,minGrad,mu,muMax,... doValidation,VV,maxFail) ## check number of inputs
--- a/main/optim/inst/__poly_2_extrema.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/__poly_2_extrema.m Wed Aug 28 20:24:54 2013 +0000 @@ -35,7 +35,7 @@ d = (2*(f(1)*(m-1)+f(2)-f(3)*m)); if abs (d) < eps, printf ("poly_2_ex : divisor is small (solution at infinity)\n"); - printf ("%8.3e %8.3e %8.3e, %8.3e %8.3e\n",\ + printf ("%8.3e %8.3e %8.3e, %8.3e %8.3e\n",... f(1), diff (f), diff (sort (l))); ex = (2*(l(1)>l(2))-1)*inf;
--- a/main/optim/inst/brent_line_min.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/brent_line_min.m Wed Aug 28 20:24:54 2013 +0000 @@ -72,7 +72,7 @@ if a>b, tmp=a; a=b; b=tmp; end if narg > length (args), - printf ("brent_line_min : narg==%i > length (args)==%i",\ + printf ("brent_line_min : narg==%i > length (args)==%i",... narg, length (args)); keyboard end @@ -123,7 +123,7 @@ nev++; if verbose, - printf ("[a,s,b]=[%.3e,%.3e,%.3e], [ga,gs,gb]=[%.3e,%.3e,%.3e]\n",\ + printf ("[a,s,b]=[%.3e,%.3e,%.3e], [ga,gs,gb]=[%.3e,%.3e,%.3e]\n",... a,s,b,ga,gs,gb); end @@ -147,7 +147,7 @@ # look linear ## mydet = sum (l([2 3 1]).*f([3 1 2])-l([3 1 2]).*f([2 3 1])) mydet = sum ([s b a].*[gb ga gs] - [b a s].*[gs gb ga]); - if min (b-s, s-a) > 10*seps && abs (mydet) > 10*seps && \ + if min (b-s, s-a) > 10*seps && abs (mydet) > 10*seps && ... (t = poly_2_ex ([a,s,b], [ga, gs, gb])) < b && t > a, # t has already been set @@ -212,7 +212,7 @@ end if verbose, - printf ("[a,s,b]=[%.3e,%.3e,%.3e], [ga,gs,gb]=[%.3e,%.3e,%.3e]\n",\ + printf ("[a,s,b]=[%.3e,%.3e,%.3e], [ga,gs,gb]=[%.3e,%.3e,%.3e]\n",... a,s,b,ga,gs,gb); end ## keyboard
--- a/main/optim/inst/cdiff.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/cdiff.m Wed Aug 28 20:24:54 2013 +0000 @@ -57,8 +57,8 @@ if nargin<4 || strcmp(dfunc,""), dfunc = ["d",func] ; if exist(dfunc)>=2, - printf(["cdiff : Warning : name of derivative not specified\n",\ - " and canonic name '%s' is already taken\n"],\ + printf(["cdiff : Warning : name of derivative not specified\n",... + " and canonic name '%s' is already taken\n"],... dfunc); ## keyboard end @@ -96,13 +96,13 @@ calstr = strrep(argstr,"dvar",calstr) ; calstr = sprintf("%s(%s)",func,calstr) ; - calstr = sprintf(strcat(" dv = kron (eye(sz(2)), eye(sz(1))(:));\n",\ - " res = %s;\n",\ - " sr = size(res)./[2*ps,1];\n",\ - " pr = prod (sr);\n",\ - " df = (res(sr(1)*ps+1:2*sr(1)*ps,:)-res(1:sr(1)*ps,:))/(2*dx);\n",\ - " scramble = reshape (1:pr,sr(2),sr(1))';\n",\ - " df = reshape (df',pr,ps)(scramble(:),:);\n"),\ + calstr = sprintf(strcat(" dv = kron (eye(sz(2)), eye(sz(1))(:));\n",... + " res = %s;\n",... + " sr = size(res)./[2*ps,1];\n",... + " pr = prod (sr);\n",... + " df = (res(sr(1)*ps+1:2*sr(1)*ps,:)-res(1:sr(1)*ps,:))/(2*dx);\n",... + " scramble = reshape (1:pr,sr(2),sr(1))';\n",... + " df = reshape (df',pr,ps)(scramble(:),:);\n"),... calstr) ; ## sayif(verbose,"cdiff : calstr='%s'\n",calstr) ; else # No stacking ######################## @@ -117,14 +117,14 @@ calstr = sprintf(calstr,"+","-") ; tmp = calstr ; ## sayif(verbose,"cdiff : calstr='%s'\n",calstr) ; - calstr = sprintf(strcat(" dv = zeros (sz); dv(1) = dx;\n",\ - " df0 = %s;\n",\ - " sr = size (df0);\n",\ - " df = zeros(prod (sr),ps); df(:,1) = df0(:);\n",\ - " for i = 2:ps,\n",\ - " dv(i) = dx; dv(i-1) = 0;\n",\ - " df(:,i) = (%s)(:);\n",\ - " end;\n",\ + calstr = sprintf(strcat(" dv = zeros (sz); dv(1) = dx;\n",... + " df0 = %s;\n",... + " sr = size (df0);\n",... + " df = zeros(prod (sr),ps); df(:,1) = df0(:);\n",... + " for i = 2:ps,\n",... + " dv(i) = dx; dv(i-1) = 0;\n",... + " df(:,i) = (%s)(:);\n",... + " end;\n",... " df ./= 2*dx;\n" ), calstr, tmp) ; @@ -140,16 +140,16 @@ argstr = strrep (argstr, "...", "varargin"); calstr = strrep (calstr, "...", "varargin{:}"); -c = sprintf(strcat("function df = %s (%s)\n",\ - " ## Numerical differentiation of '%s' wrt to it's %d'th argument\n",\ - " ## This function has been written by 'cdiff()'\n",\ - " dx = %e;\n",\ - " sz = size (dvar);\n",\ - " ps = prod (sz);\n",\ - "%s",\ - "endfunction\n"),\ - dfunc,argstr,\ - func,wrt,\ - dx,\ +c = sprintf(strcat("function df = %s (%s)\n",... + " ## Numerical differentiation of '%s' wrt to it's %d'th argument\n",... + " ## This function has been written by 'cdiff()'\n",... + " dx = %e;\n",... + " sz = size (dvar);\n",... + " ps = prod (sz);\n",... + "%s",... + "endfunction\n"),... + dfunc,argstr,... + func,wrt,... + dx,... calstr) ;
--- a/main/optim/inst/curvefit_stat.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/curvefit_stat.m Wed Aug 28 20:24:54 2013 +0000 @@ -47,7 +47,7 @@ ## sometime in 3.3.54+, if I remember right optimget = @ __optimget__; endif - if (! isempty (dfdp = optimget (settings, "dfdp")) && \ + if (! isempty (dfdp = optimget (settings, "dfdp")) && ... ! (ismatrix (dfdp) && ! ischar (dfdp))) if (ischar (dfdp)) dfdp = str2func (dfdp); @@ -58,7 +58,7 @@ f = @ (p) f (p, x); endif - ret = __residmin_stat__ \ + ret = __residmin_stat__ ... (f, pfin, settings, struct ("observations", y)); endfunction
--- a/main/optim/inst/d2_min.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/d2_min.m Wed Aug 28 20:24:54 2013 +0000 @@ -177,9 +177,9 @@ [v,d,h] = feval (d2f, args{1:narg-1},reshape(x,sz),args{narg+1:end}); nev(2)++; - if prudent && niter <= 1 && \ - (! isnumeric (v) || isnan (v) || any (size (v)>1) || \ - ! isnumeric (d) || length (d(:)) != N || \ + if prudent && niter <= 1 && ... + (! isnumeric (v) || isnan (v) || any (size (v)>1) || ... + ! isnumeric (d) || length (d(:)) != N || ... ! isnumeric (h) || any (size (h) != N)) error ("Function '%s' returns inadequate output", d2f); end @@ -302,7 +302,7 @@ if verbose || rem(niter,max(report,1)) == 1 if vold, if verbose - printf ("d2_min : Inner loop : vbest=%8.5g, vbest/vold=%8.5g\n",\ + printf ("d2_min : Inner loop : vbest=%8.5g, vbest/vold=%8.5g\n",... vbest,vbest/vold); end else @@ -319,7 +319,7 @@ nev(1)++; if abs (tmpv-vbest) > eps - printf ("d2_min : Whoa! Value at xbest changed by %g\n",\ + printf ("d2_min : Whoa! Value at xbest changed by %g\n",... abs(tmpv-vbest)); end end @@ -341,7 +341,7 @@ tmpv = feval (f, args{1:narg-1},reshape(x,sz),args{2:end}); nev(1)++; if abs (tmpv-vbest) > max (min (100*eps,0.00001*abs(vbest)), eps) , - printf ("d2_min : Whoa! Value changes by %g after eval (code)\n",\ + printf ("d2_min : Whoa! Value changes by %g after eval (code)\n",... abs (tmpv-vbest)); end end
--- a/main/optim/inst/fminunc_compat.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/fminunc_compat.m Wed Aug 28 20:24:54 2013 +0000 @@ -67,12 +67,12 @@ ## Check for unknown options ## All known options -opn = [" DerivativeCheck Diagnostics DiffMaxChange DiffMinChange",\ - " Display GoalsExactAchieve GradConstr GradObj Hessian HessMult",\ - " HessPattern HessUpdate Jacobian JacobMult JacobPattern",\ - " LargeScale LevenbergMarquardt LineSearchType MaxFunEvals MaxIter",\ - " MaxPCGIter MeritFunction MinAbsMax PrecondBandWidth TolCon",\ - " TolFun TolPCG TolX TypicalX ",\ +opn = [" DerivativeCheck Diagnostics DiffMaxChange DiffMinChange",... + " Display GoalsExactAchieve GradConstr GradObj Hessian HessMult",... + " HessPattern HessUpdate Jacobian JacobMult JacobPattern",... + " LargeScale LevenbergMarquardt LineSearchType MaxFunEvals MaxIter",... + " MaxPCGIter MeritFunction MinAbsMax PrecondBandWidth TolCon",... + " TolFun TolPCG TolX TypicalX ",... " MinEquiv Backend "]; for [v,k] = opt @@ -82,11 +82,11 @@ end ## Check for ignored options ## All ignored options -iop = [" DerivativeCheck DiffMaxChange DiffMinChange",\ - " Display GoalsExactAchieve GradConstr HessMult",\ - " HessPattern HessUpdate JacobMult JacobPattern",\ - " LargeScale LevenbergMarquardt LineSearchType",\ - " MaxPCGIter MeritFunction MinAbsMax PrecondBandWidth TolCon",\ +iop = [" DerivativeCheck DiffMaxChange DiffMinChange",... + " Display GoalsExactAchieve GradConstr HessMult",... + " HessPattern HessUpdate JacobMult JacobPattern",... + " LargeScale LevenbergMarquardt LineSearchType",... + " MaxPCGIter MeritFunction MinAbsMax PrecondBandWidth TolCon",... " TolPCG TypicalX "]; for [v,k] = opt if ! findstr ([" ",k," "],iop) @@ -102,10 +102,10 @@ opm = struct(); # minimize() options -equiv = struct ("TolX" , "utol" , "TolFun" , "ftol",\ - "MaxFunEvals", "maxev" , "MaxIter" , "maxit",\ - "GradObj" , "jac" , "Hessian" , "hess",\ - "Display" , "verbose", "Diagnostics", "verbose",\ +equiv = struct ("TolX" , "utol" , "TolFun" , "ftol",... + "MaxFunEvals", "maxev" , "MaxIter" , "maxit",... + "GradObj" , "jac" , "Hessian" , "hess",... + "Display" , "verbose", "Diagnostics", "verbose",... "Backend" , "backend"); for [v,k] = equiv
--- a/main/optim/inst/minimize.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/minimize.m Wed Aug 28 20:24:54 2013 +0000 @@ -129,11 +129,11 @@ # Boolean options op0 = "verbose backend jac hess ihess ndiff" ; -default = struct ("backend",0,"verbose",0,\ - "df","", "df", "","d2f","","d2i","", \ - "hess", 0, "ihess", 0, "jac", 0,"ndiff", 0, \ - "ftol" ,nan, "utol",nan, "dtol", nan,\ - "order",nan, "narg",nan, "maxev",nan,\ +default = struct ("backend",0,"verbose",0,... + "df","", "df", "","d2f","","d2i","", ... + "hess", 0, "ihess", 0, "jac", 0,"ndiff", 0, ... + "ftol" ,nan, "utol",nan, "dtol", nan,... + "order",nan, "narg",nan, "maxev",nan,... "isz", nan); if nargin == 3 # Accomodation to struct and list optional @@ -156,7 +156,7 @@ else opls = varargin; end -ops = read_options (opls,\ +ops = read_options (opls,... "op0",op0, "op1",op1, "default",default); backend=ops.backend; verbose=ops.verbose; @@ -175,7 +175,7 @@ es = ""; # Error string # Warn if more than 1 differential is given -if !!length (df) + !!length (d2f) + !!length (d2i) + jac + hess + ihess + \ +if !!length (df) + !!length (d2f) + !!length (d2i) + jac + hess + ihess + ... ndiff > 1 # Order of preference of if length (d2i), ws = [ws,"d2i='",d2i,"', "]; end
--- a/main/optim/inst/nelder_mead_min.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/nelder_mead_min.m Wed Aug 28 20:24:54 2013 +0000 @@ -192,7 +192,7 @@ # Eventually print some info if verbose && nev > nextprint && ! done - printf("nev=%-5d imin=%-3d ymin=%-8.3g done=%i\n",\ + printf("nev=%-5d imin=%-3d ymin=%-8.3g done=%i\n",... nev,imin,ymin,done) ; nextprint = nextprint + 100 ; @@ -215,7 +215,7 @@ jumplen = 10 * max (max (u) - min (u)); u += jumplen * randn (size (u)); - for i = 1:N+1, y(i) = \ + for i = 1:N+1, y(i) = ... feval (f, args{1:narg-1},reshape(u(i,:),R,C),args{narg+1:length(args)}); end nev += N+1; @@ -229,7 +229,7 @@ v = ymin ; end if verbose, - printf("nev=%-5d imin=%-3d ymin=%-8.3g done=%i. Done\n",\ + printf("nev=%-5d imin=%-3d ymin=%-8.3g done=%i. Done\n",... nev,imin,ymin,done) ; end return @@ -312,7 +312,7 @@ elseif imin == N+1, ii = 1:N; else ii = [1:imin-1,imin+1:N+1]; end for i = ii - y(i) = \ + y(i) = ... ynew = feval (f, args{1:narg-1},reshape(u(i,:),R,C),args{narg+1:length(args)}); end ## 'contraction'
--- a/main/optim/inst/nonlin_curvefit.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/nonlin_curvefit.m Wed Aug 28 20:24:54 2013 +0000 @@ -63,7 +63,7 @@ settings.dfdp = @ (p, varargin) dfdp (p, x, varargin{:}); endif - [p, fy, cvg, outp] = __nonlin_residmin__ \ + [p, fy, cvg, outp] = __nonlin_residmin__ ... (@ (p) f (p, x), pin, settings, struct ("observations", y)); fy += y;
--- a/main/optim/inst/nonlin_min.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/nonlin_min.m Wed Aug 28 20:24:54 2013 +0000 @@ -332,48 +332,48 @@ cstep_default = 1e-20; if (nargin == 1 && ischar (f) && strcmp (f, "defaults")) - p = optimset ("param_config", [], \ - "param_order", [], \ - "param_dims", [], \ - "f_inequc_pstruct", false, \ - "f_equc_pstruct", false, \ - "objf_pstruct", false, \ - "df_inequc_pstruct", false, \ - "df_equc_pstruct", false, \ - "objf_grad_pstruct", false, \ - "objf_hessian_pstruct", false, \ - "lbound", [], \ - "ubound", [], \ - "objf_grad", [], \ - "objf_hessian", [], \ - "cpiv", @ cpiv_bard, \ - "max_fract_change", [], \ - "fract_prec", [], \ - "diffp", [], \ - "diff_onesided", [], \ - "complex_step_derivative_objf", false, \ - "complex_step_derivative_inequc", false, \ - "complex_step_derivative_equc", false, \ - "cstep", cstep_default, \ - "fixed", [], \ - "inequc", [], \ - "equc", [], \ - "inequc_f_idx", false, \ - "inequc_df_idx", false, \ - "equc_f_idx", false, \ - "equc_df_idx", false, \ - "TolFun", stol_default, \ - "MaxIter", [], \ - "Display", "off", \ - "Algorithm", "lm_feasible", \ - "T_init", .01, \ - "T_min", 1.0e-5, \ - "mu_T", 1.005, \ - "iters_fixed_T", 10, \ - "max_rand_step", [], \ - "stoch_regain_constr", false, \ - "trace_steps", false, \ - "siman_log", false, \ + p = optimset ("param_config", [], ... + "param_order", [], ... + "param_dims", [], ... + "f_inequc_pstruct", false, ... + "f_equc_pstruct", false, ... + "objf_pstruct", false, ... + "df_inequc_pstruct", false, ... + "df_equc_pstruct", false, ... + "objf_grad_pstruct", false, ... + "objf_hessian_pstruct", false, ... + "lbound", [], ... + "ubound", [], ... + "objf_grad", [], ... + "objf_hessian", [], ... + "cpiv", @ cpiv_bard, ... + "max_fract_change", [], ... + "fract_prec", [], ... + "diffp", [], ... + "diff_onesided", [], ... + "complex_step_derivative_objf", false, ... + "complex_step_derivative_inequc", false, ... + "complex_step_derivative_equc", false, ... + "cstep", cstep_default, ... + "fixed", [], ... + "inequc", [], ... + "equc", [], ... + "inequc_f_idx", false, ... + "inequc_df_idx", false, ... + "equc_f_idx", false, ... + "equc_df_idx", false, ... + "TolFun", stol_default, ... + "MaxIter", [], ... + "Display", "off", ... + "Algorithm", "lm_feasible", ... + "T_init", .01, ... + "T_min", 1.0e-5, ... + "mu_T", 1.005, ... + "iters_fixed_T", 10, ... + "max_rand_step", [], ... + "stoch_regain_constr", false, ... + "trace_steps", false, ... + "siman_log", false, ... "debug", false); return; endif @@ -406,9 +406,9 @@ f_pstruct = optimget (settings, "objf_pstruct", false); dfdp_pstruct = optimget (settings, "objf_grad_pstruct", f_pstruct); hessian_pstruct = optimget (settings, "objf_hessian_pstruct", f_pstruct); - df_inequc_pstruct = optimget (settings, "df_inequc_pstruct", \ + df_inequc_pstruct = optimget (settings, "df_inequc_pstruct", ... f_inequc_pstruct); - df_equc_pstruct = optimget (settings, "df_equc_pstruct", \ + df_equc_pstruct = optimget (settings, "df_equc_pstruct", ... f_equc_pstruct); lbound = optimget (settings, "lbound"); ubound = optimget (settings, "ubound"); @@ -425,24 +425,24 @@ if (do_cstep && ! isempty (dfdp)) error ("both 'complex_step_derivative_objf' and 'objf_grad' are set"); endif - do_cstep_inequc = \ + do_cstep_inequc = ... optimget (settings, "complex_step_derivative_inequc", false); - do_cstep_equc = optimget (settings, "complex_step_derivative_equc", \ + do_cstep_equc = optimget (settings, "complex_step_derivative_equc", ... false); max_rand_step = optimget (settings, "max_rand_step"); - any_vector_conf = ! (isempty (lbound) && isempty (ubound) && \ - isempty (max_fract_change) && \ - isempty (fract_prec) && isempty (diffp) && \ - isempty (diff_onesided) && isempty (fixed) && \ + any_vector_conf = ! (isempty (lbound) && isempty (ubound) && ... + isempty (max_fract_change) && ... + isempty (fract_prec) && isempty (diffp) && ... + isempty (diff_onesided) && isempty (fixed) && ... isempty (max_rand_step)); ## collect constraints - [mc, vc, f_genicstr, df_gencstr, user_df_gencstr] = \ - __collect_constraints__ (optimget (settings, "inequc"), \ + [mc, vc, f_genicstr, df_gencstr, user_df_gencstr] = ... + __collect_constraints__ (optimget (settings, "inequc"), ... do_cstep_inequc, "inequality constraints"); - [emc, evc, f_genecstr, df_genecstr, user_df_genecstr] = \ - __collect_constraints__ (optimget (settings, "equc"), \ + [emc, evc, f_genecstr, df_genecstr, user_df_genecstr] = ... + __collect_constraints__ (optimget (settings, "equc"), ... do_cstep_equc, "equality constraints"); mc_struct = isstruct (mc); emc_struct = isstruct (emc); @@ -454,13 +454,13 @@ if (isempty (f_genicstr)) f_inequc_pstruct = false; elseif (! optimget (settings, "inequc_f_idx", false)) - f_genicstr = @ (p, varargin) apply_idx_if_given \ + f_genicstr = @ (p, varargin) apply_idx_if_given ... (f_genicstr (p, varargin{:}), varargin{:}); endif if (isempty (f_genecstr)) f_equc_pstruct = false; elseif (! optimget (settings, "equc_f_idx", false)) - f_genecstr = @ (p, varargin) apply_idx_if_given \ + f_genecstr = @ (p, varargin) apply_idx_if_given ... (f_genecstr (p, varargin{:}), varargin{:}); endif if (user_df_gencstr) @@ -479,21 +479,21 @@ endif ## some settings require a parameter order - if (pin_struct || ! isempty (pconf) || f_inequc_pstruct || \ - f_equc_pstruct || f_pstruct || dfdp_pstruct || \ - hessian_pstruct || df_inequc_pstruct || df_equc_pstruct || \ + if (pin_struct || ! isempty (pconf) || f_inequc_pstruct || ... + f_equc_pstruct || f_pstruct || dfdp_pstruct || ... + hessian_pstruct || df_inequc_pstruct || df_equc_pstruct || ... mc_struct || emc_struct) if (isempty (pord)) if (pin_struct) - if (any_vector_conf || \ - ! (f_pstruct && \ - (f_inequc_pstruct || isempty (f_genicstr)) && \ - (f_equc_pstruct || isempty (f_genecstr)) && \ - (dfdp_pstruct || isempty (dfdp)) && \ - (hessian_pstruct || isempty (hessian)) && \ - (df_inequc_pstruct || ! user_df_gencstr) && \ - (df_equc_pstruct || ! user_df_genecstr) && \ - (mc_struct || isempty (mc)) && \ + if (any_vector_conf || ... + ! (f_pstruct && ... + (f_inequc_pstruct || isempty (f_genicstr)) && ... + (f_equc_pstruct || isempty (f_genecstr)) && ... + (dfdp_pstruct || isempty (dfdp)) && ... + (hessian_pstruct || isempty (hessian)) && ... + (df_inequc_pstruct || ! user_df_gencstr) && ... + (df_equc_pstruct || ! user_df_genecstr) && ... + (mc_struct || isempty (mc)) && ... (emc_struct || isempty (emc)))) error ("no parameter order specified and constructing a parameter order from the structure of initial parameters can not be done since not all configuration or given functions are structure based"); else @@ -512,15 +512,15 @@ endif if (isempty (pdims)) if (pin_struct) - pdims = cellfun \ + pdims = cellfun ... (@ size, fields2cell (pin, pord), "UniformOutput", false); else pdims = num2cell (ones (nnames, 2), 2); endif else pdims = pdims(:); - if (pin_struct && \ - ! all (cellfun (@ (x, y) prod (size (x)) == prod (y), \ + if (pin_struct && ... + ! all (cellfun (@ (x, y) prod (size (x)) == prod (y), ... struct2cell (pin), pdims))) error ("given param_dims and dimensions of initial parameters do not match"); endif @@ -533,13 +533,13 @@ if (any (pnel > 1)) pnonscalar = true; cpnel = num2cell (pnel); - prepidx = cat (1, cellfun \ - (@ (x, n) x(ones (1, n), 1), \ - num2cell ((1:nnames).'), cpnel, \ + prepidx = cat (1, cellfun ... + (@ (x, n) x(ones (1, n), 1), ... + num2cell ((1:nnames).'), cpnel, ... "UniformOutput", false){:}); epord = pord(prepidx, 1); - psubidx = cat (1, cellfun \ - (@ (n) (1:n).', cpnel, \ + psubidx = cat (1, cellfun ... + (@ (n) (1:n).', cpnel, ... "UniformOutput", false){:}); else pnonscalar = false; # some less expensive interfaces later @@ -562,7 +562,7 @@ plabels = num2cell (num2cell ((1:np).')); if (! isempty (pord)) - plabels = cat (2, plabels, num2cell (epord), \ + plabels = cat (2, plabels, num2cell (epord), ... num2cell (num2cell (psubidx))); endif @@ -586,7 +586,7 @@ ## supplement parameter names lacking in param_config nidx = ! isfield (pconf, pord); - pconf = cell2fields ({struct()}(ones (1, sum (nidx))), \ + pconf = cell2fields ({struct()}(ones (1, sum (nidx))), ... pord(nidx), 2, pconf); pconf = structcat (1, fields2cell (pconf, pord){:}); @@ -599,9 +599,9 @@ if (isfield (pconf, "lbound")) idx = ! fieldempty (pconf, "lbound"); if (pnonscalar) - lbound (idx(prepidx), 1) = \ - cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).lbound}.', \ + lbound (idx(prepidx), 1) = ... + cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).lbound}.', ... cpnel(idx), "UniformOutput", false){:}); else lbound(idx, 1) = cat (1, pconf.lbound); @@ -612,9 +612,9 @@ if (isfield (pconf, "ubound")) idx = ! fieldempty (pconf, "ubound"); if (pnonscalar) - ubound (idx(prepidx), 1) = \ - cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).ubound}.', \ + ubound (idx(prepidx), 1) = ... + cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).ubound}.', ... cpnel(idx), "UniformOutput", false){:}); else ubound(idx, 1) = cat (1, pconf.ubound); @@ -626,10 +626,10 @@ if (isfield (pconf, "max_fract_change")) idx = ! fieldempty (pconf, "max_fract_change"); if (pnonscalar) - max_fract_change(idx(prepidx)) = \ - cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).max_fract_change}.', \ - cpnel(idx), \ + max_fract_change(idx(prepidx)) = ... + cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).max_fract_change}.', ... + cpnel(idx), ... "UniformOutput", false){:}); else max_fract_change(idx) = [pconf.max_fract_change]; @@ -639,9 +639,9 @@ if (isfield (pconf, "fract_prec")) idx = ! fieldempty (pconf, "fract_prec"); if (pnonscalar) - fract_prec(idx(prepidx)) = \ - cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).fract_prec}.', cpnel(idx), \ + fract_prec(idx(prepidx)) = ... + cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).fract_prec}.', cpnel(idx), ... "UniformOutput", false){:}); else fract_prec(idx) = [pconf.fract_prec]; @@ -653,9 +653,9 @@ if (isfield (pconf, "diffp")) idx = ! fieldempty (pconf, "diffp"); if (pnonscalar) - diffp(idx(prepidx)) = \ - cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).diffp}.', cpnel(idx), \ + diffp(idx(prepidx)) = ... + cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).diffp}.', cpnel(idx), ... "UniformOutput", false){:}); else diffp(idx) = [pconf.diffp]; @@ -667,10 +667,10 @@ if (isfield (pconf, "diff_onesided")) idx = ! fieldempty (pconf, "diff_onesided"); if (pnonscalar) - diff_onesided(idx(prepidx)) = \ - logical \ - (cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).diff_onesided}.', cpnel(idx), \ + diff_onesided(idx(prepidx)) = ... + logical ... + (cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).diff_onesided}.', cpnel(idx), ... "UniformOutput", false){:})); else diff_onesided(idx) = logical ([pconf.diff_onesided]); @@ -680,10 +680,10 @@ if (isfield (pconf, "fixed")) idx = ! fieldempty (pconf, "fixed"); if (pnonscalar) - fixed(idx(prepidx)) = \ - logical \ - (cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).fixed}.', cpnel(idx), \ + fixed(idx(prepidx)) = ... + logical ... + (cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).fixed}.', cpnel(idx), ... "UniformOutput", false){:})); else fixed(idx) = logical ([pconf.fixed]); @@ -695,11 +695,11 @@ if (isfield (pconf, "max_rand_step")) idx = ! fieldempty (pconf, "max_rand_step"); if (pnonscalar) - max_rand_step(idx(prepidx)) = \ - logical \ - (cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ + max_rand_step(idx(prepidx)) = ... + logical ... + (cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... {pconf(idx).max_rand_step}.', - cpnel(idx), \ + cpnel(idx), ... "UniformOutput", false){:})); else max_rand_step(idx) = logical ([pconf.max_rand_step]); @@ -783,8 +783,8 @@ ## initial parameters if (pin_struct) if (pnonscalar) - pin = cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - fields2cell (pin, pord), cpnel, \ + pin = cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + fields2cell (pin, pord), cpnel, ... "UniformOutput", false){:}); else pin = cat (1, fields2cell (pin, pord){:}); @@ -794,13 +794,13 @@ ## objective function if (f_pstruct) if (pnonscalar) - f = @ (p, varargin) \ - f (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ + f = @ (p, varargin) ... + f (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... pord, 1), varargin{:}); else - f = @ (p, varargin) \ + f = @ (p, varargin) ... f (cell2struct (num2cell (p), pord, 1), varargin{:}); endif endif @@ -816,19 +816,19 @@ endif if (dfdp_pstruct) if (pnonscalar) - dfdp = @ (p, hook) \ - cat (2, \ - fields2cell \ - (dfdp (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ - pord, 1), hook), \ + dfdp = @ (p, hook) ... + cat (2, ... + fields2cell ... + (dfdp (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... + pord, 1), hook), ... pord){:}); else - dfdp = @ (p, hook) \ - cat (2, \ - fields2cell \ - (dfdp (cell2struct (num2cell (p), pord, 1), hook), \ + dfdp = @ (p, hook) ... + cat (2, ... + fields2cell ... + (dfdp (cell2struct (num2cell (p), pord, 1), hook), ... pord){:}); endif endif @@ -836,15 +836,15 @@ ## hessian of objective function if (hessian_pstruct) if (pnonscalar) - hessian = @ (p) \ - hessian_struct2mat \ - (hessian (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ + hessian = @ (p) ... + hessian_struct2mat ... + (hessian (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... pord, 1)), pord); else - hessian = @ (p) \ - hessian_struct2mat \ + hessian = @ (p) ... + hessian_struct2mat ... (hessian (cell2struct (num2cell (p), pord, 1)), pord); endif endif @@ -852,14 +852,14 @@ ## function for general inequality constraints if (f_inequc_pstruct) if (pnonscalar) - f_genicstr = @ (p, varargin) \ - f_genicstr (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ + f_genicstr = @ (p, varargin) ... + f_genicstr (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... pord, 1), varargin{:}); else - f_genicstr = @ (p, varargin) \ - f_genicstr \ + f_genicstr = @ (p, varargin) ... + f_genicstr ... (cell2struct (num2cell (p), pord, 1), varargin{:}); endif endif @@ -870,21 +870,21 @@ ## jacobian of general inequality constraints if (df_inequc_pstruct) if (pnonscalar) - df_gencstr = @ (p, func, idx, hook) \ - cat (2, \ - fields2cell \ - (df_gencstr \ - (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), pord, 1), \ - func, idx, hook), \ + df_gencstr = @ (p, func, idx, hook) ... + cat (2, ... + fields2cell ... + (df_gencstr ... + (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), pord, 1), ... + func, idx, hook), ... pord){:}); else - df_gencstr = @ (p, func, idx, hook) \ - cat (2, \ - fields2cell \ - (df_gencstr (cell2struct (num2cell (p), pord, 1), \ - func, idx, hook), \ + df_gencstr = @ (p, func, idx, hook) ... + cat (2, ... + fields2cell ... + (df_gencstr (cell2struct (num2cell (p), pord, 1), ... + func, idx, hook), ... pord){:}); endif endif @@ -892,14 +892,14 @@ ## function for general equality constraints if (f_equc_pstruct) if (pnonscalar) - f_genecstr = @ (p, varargin) \ - f_genecstr (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ + f_genecstr = @ (p, varargin) ... + f_genecstr (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... pord, 1), varargin{:}); else - f_genecstr = @ (p, varargin) \ - f_genecstr \ + f_genecstr = @ (p, varargin) ... + f_genecstr ... (cell2struct (num2cell (p), pord, 1), varargin{:}); endif endif @@ -910,21 +910,21 @@ ## jacobian of general equality constraints if (df_equc_pstruct) if (pnonscalar) - df_genecstr = @ (p, func, idx, hook) \ - cat (2, \ - fields2cell \ - (df_genecstr \ - (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), pord, 1), \ - func, idx, hook), \ + df_genecstr = @ (p, func, idx, hook) ... + cat (2, ... + fields2cell ... + (df_genecstr ... + (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), pord, 1), ... + func, idx, hook), ... pord){:}); else - df_genecstr = @ (p, func, idx, hook) \ - cat (2, \ - fields2cell \ - (df_genecstr (cell2struct (num2cell (p), pord, 1), \ - func, idx, hook), \ + df_genecstr = @ (p, func, idx, hook) ... + cat (2, ... + fields2cell ... + (df_genecstr (cell2struct (num2cell (p), pord, 1), ... + func, idx, hook), ... pord){:}); endif endif @@ -954,29 +954,29 @@ ## parameter-related configuration for jacobian functions if (dfdp_pstruct || df_inequc_pstruct || df_equc_pstruct) if(pnonscalar) - s_diffp = cell2struct \ - (cellfun (@ reshape, mat2cell (diffp, ppartidx), \ + s_diffp = cell2struct ... + (cellfun (@ reshape, mat2cell (diffp, ppartidx), ... pdims, "UniformOutput", false), pord, 1); - s_diff_onesided = cell2struct \ - (cellfun (@ reshape, mat2cell (diff_onesided, ppartidx), \ + s_diff_onesided = cell2struct ... + (cellfun (@ reshape, mat2cell (diff_onesided, ppartidx), ... pdims, "UniformOutput", false), pord, 1); - s_orig_lbound = cell2struct \ - (cellfun (@ reshape, mat2cell (lbound, ppartidx), \ + s_orig_lbound = cell2struct ... + (cellfun (@ reshape, mat2cell (lbound, ppartidx), ... pdims, "UniformOutput", false), pord, 1); - s_orig_ubound = cell2struct \ - (cellfun (@ reshape, mat2cell (ubound, ppartidx), \ + s_orig_ubound = cell2struct ... + (cellfun (@ reshape, mat2cell (ubound, ppartidx), ... pdims, "UniformOutput", false), pord, 1); - s_plabels = cell2struct \ - (num2cell \ - (cat (2, cellfun \ - (@ (x) cellfun \ - (@ reshape, mat2cell (cat (1, x{:}), ppartidx), \ - pdims, "UniformOutput", false), \ - num2cell (plabels, 1), "UniformOutput", false){:}), \ - 2), \ + s_plabels = cell2struct ... + (num2cell ... + (cat (2, cellfun ... + (@ (x) cellfun ... + (@ reshape, mat2cell (cat (1, x{:}), ppartidx), ... + pdims, "UniformOutput", false), ... + num2cell (plabels, 1), "UniformOutput", false){:}), ... + 2), ... pord, 1); - s_orig_fixed = cell2struct \ - (cellfun (@ reshape, mat2cell (fixed, ppartidx), \ + s_orig_fixed = cell2struct ... + (cellfun (@ reshape, mat2cell (fixed, ppartidx), ... pdims, "UniformOutput", false), pord, 1); else s_diffp = cell2struct (num2cell (diffp), pord, 1); @@ -1063,11 +1063,11 @@ hook.siman.T_min = optimget (settings, "T_min", 1.0e-5); hook.siman.mu_T = optimget (settings, "mu_T", 1.005); hook.siman.iters_fixed_T = optimget (settings, "iters_fixed_T", 10); - hook.stoch_regain_constr = \ + hook.stoch_regain_constr = ... optimget (settings, "stoch_regain_constr", false); - hook.trace_steps = \ + hook.trace_steps = ... optimget (settings, "trace_steps", false); - hook.siman_log = \ + hook.siman_log = ... optimget (settings, "siman_log", false); backend = optimget (settings, "Algorithm", "lm_feasible"); backend = map_matlab_algorithm_names (backend); @@ -1084,38 +1084,38 @@ nonfixed = ! fixed; if (any (fixed)) ## backend (returned values and initial parameters) - backend = @ (f, pin, hook) \ + backend = @ (f, pin, hook) ... backend_wrapper (backend, fixed, f, pin, hook); ## objective function f = @ (p, varargin) f (assign (pin, nonfixed, p), varargin{:}); ## gradient of objective function - dfdp = @ (p, hook) \ + dfdp = @ (p, hook) ... dfdp (assign (pin, nonfixed, p), hook)(nonfixed); ## hessian of objective function if (! isempty (hessian)) - hessian = @ (p) \ + hessian = @ (p) ... hessian (assign (pin, nonfixed, p))(nonfixed, nonfixed); endif ## function for general inequality constraints - f_genicstr = @ (p, varargin) \ + f_genicstr = @ (p, varargin) ... f_genicstr (assign (pin, nonfixed, p), varargin{:}); ## jacobian of general inequality constraints - df_gencstr = @ (p, func, idx, hook) \ - df_gencstr (assign (pin, nonfixed, p), func, idx, hook) \ + df_gencstr = @ (p, func, idx, hook) ... + df_gencstr (assign (pin, nonfixed, p), func, idx, hook) ... (:, nonfixed); ## function for general equality constraints - f_genecstr = @ (p, varargin) \ + f_genecstr = @ (p, varargin) ... f_genecstr (assign (pin, nonfixed, p), varargin{:}); ## jacobian of general equality constraints - df_genecstr = @ (p, func, idx, hook) \ - df_genecstr (assign (pin, nonfixed, p), func, idx, hook) \ + df_genecstr = @ (p, func, idx, hook) ... + df_genecstr (assign (pin, nonfixed, p), func, idx, hook) ... (:, nonfixed); ## linear inequality constraints @@ -1140,67 +1140,67 @@ ## gradient of objective function if (dfdp_pstruct) - dfdp = @ (p, hook) \ - dfdp (p, cell2fields \ - ({s_diffp, s_diff_onesided, s_orig_lbound, \ - s_orig_ubound, s_plabels, \ - cell2fields(num2cell(hook.fixed), pord(nonfixed), \ - 1, s_orig_fixed), cstep}, \ - {"diffp", "diff_onesided", "lbound", "ubound", \ - "plabels", "fixed", "h"}, \ + dfdp = @ (p, hook) ... + dfdp (p, cell2fields ... + ({s_diffp, s_diff_onesided, s_orig_lbound, ... + s_orig_ubound, s_plabels, ... + cell2fields(num2cell(hook.fixed), pord(nonfixed), ... + 1, s_orig_fixed), cstep}, ... + {"diffp", "diff_onesided", "lbound", "ubound", ... + "plabels", "fixed", "h"}, ... 2, hook)); else - dfdp = @ (p, hook) \ - dfdp (p, cell2fields \ - ({diffp, diff_onesided, orig_lbound, orig_ubound, \ - plabels, assign(orig_fixed, nonfixed, hook.fixed), \ - cstep}, \ - {"diffp", "diff_onesided", "lbound", "ubound", \ - "plabels", "fixed", "h"}, \ + dfdp = @ (p, hook) ... + dfdp (p, cell2fields ... + ({diffp, diff_onesided, orig_lbound, orig_ubound, ... + plabels, assign(orig_fixed, nonfixed, hook.fixed), ... + cstep}, ... + {"diffp", "diff_onesided", "lbound", "ubound", ... + "plabels", "fixed", "h"}, ... 2, hook)); endif ## jacobian of general inequality constraints if (df_inequc_pstruct) - df_gencstr = @ (p, func, idx, hook) \ - df_gencstr (p, func, idx, cell2fields \ - ({s_diffp, s_diff_onesided, s_orig_lbound, \ - s_orig_ubound, s_plabels, \ - cell2fields(num2cell(hook.fixed), pord(nonfixed), \ - 1, s_orig_fixed), cstep}, \ - {"diffp", "diff_onesided", "lbound", "ubound", \ - "plabels", "fixed", "h"}, \ + df_gencstr = @ (p, func, idx, hook) ... + df_gencstr (p, func, idx, cell2fields ... + ({s_diffp, s_diff_onesided, s_orig_lbound, ... + s_orig_ubound, s_plabels, ... + cell2fields(num2cell(hook.fixed), pord(nonfixed), ... + 1, s_orig_fixed), cstep}, ... + {"diffp", "diff_onesided", "lbound", "ubound", ... + "plabels", "fixed", "h"}, ... 2, hook)); else - df_gencstr = @ (p, func, idx, hook) \ - df_gencstr (p, func, idx, cell2fields \ - ({diffp, diff_onesided, orig_lbound, \ - orig_ubound, plabels, \ - assign(orig_fixed, nonfixed, hook.fixed), cstep}, \ - {"diffp", "diff_onesided", "lbound", "ubound", \ - "plabels", "fixed", "h"}, \ + df_gencstr = @ (p, func, idx, hook) ... + df_gencstr (p, func, idx, cell2fields ... + ({diffp, diff_onesided, orig_lbound, ... + orig_ubound, plabels, ... + assign(orig_fixed, nonfixed, hook.fixed), cstep}, ... + {"diffp", "diff_onesided", "lbound", "ubound", ... + "plabels", "fixed", "h"}, ... 2, hook)); endif ## jacobian of general equality constraints if (df_equc_pstruct) - df_genecstr = @ (p, func, idx, hook) \ - df_genecstr (p, func, idx, cell2fields \ - ({s_diffp, s_diff_onesided, s_orig_lbound, \ - s_orig_ubound, s_plabels, \ - cell2fields(num2cell(hook.fixed), pord(nonfixed), \ - 1, s_orig_fixed), cstep}, \ - {"diffp", "diff_onesided", "lbound", "ubound", \ - "plabels", "fixed", "h"}, \ + df_genecstr = @ (p, func, idx, hook) ... + df_genecstr (p, func, idx, cell2fields ... + ({s_diffp, s_diff_onesided, s_orig_lbound, ... + s_orig_ubound, s_plabels, ... + cell2fields(num2cell(hook.fixed), pord(nonfixed), ... + 1, s_orig_fixed), cstep}, ... + {"diffp", "diff_onesided", "lbound", "ubound", ... + "plabels", "fixed", "h"}, ... 2, hook)); else - df_genecstr = @ (p, func, idx, hook) \ - df_genecstr (p, func, idx, cell2fields \ - ({diffp, diff_onesided, orig_lbound, \ - orig_ubound, plabels, \ - assign(orig_fixed, nonfixed, hook.fixed), cstep}, \ - {"diffp", "diff_onesided", "lbound", "ubound", \ - "plabels", "fixed", "h"}, \ + df_genecstr = @ (p, func, idx, hook) ... + df_genecstr (p, func, idx, cell2fields ... + ({diffp, diff_onesided, orig_lbound, ... + orig_ubound, plabels, ... + assign(orig_fixed, nonfixed, hook.fixed), cstep}, ... + {"diffp", "diff_onesided", "lbound", "ubound", ... + "plabels", "fixed", "h"}, ... 2, hook)); endif @@ -1223,41 +1223,41 @@ if (n_genicstr > 0) nidxi = 1 : n_genicstr; nidxe = n_genicstr + 1 : n_genicstr + n_genecstr; - f_gencstr = @ (p, idx, varargin) \ - cat (1, \ - f_genicstr (p, idx(nidxi), varargin{:}), \ + f_gencstr = @ (p, idx, varargin) ... + cat (1, ... + f_genicstr (p, idx(nidxi), varargin{:}), ... f_genecstr (p, idx(nidxe), varargin{:})); - df_gencstr = @ (p, idx, hook) \ - cat (1, \ - df_gencstr (p, @ (p, varargin) \ - possibly_pstruct_f_genicstr \ - (p, idx(nidxi), varargin{:}), \ - idx(nidxi), \ - setfield (hook, "f", \ - hook.f(nidxi(idx(nidxi))))), \ - df_genecstr (p, @ (p, varargin) \ - possibly_pstruct_f_genecstr \ - (p, idx(nidxe), varargin{:}), \ - idx(nidxe), \ - setfield (hook, "f", \ + df_gencstr = @ (p, idx, hook) ... + cat (1, ... + df_gencstr (p, @ (p, varargin) ... + possibly_pstruct_f_genicstr ... + (p, idx(nidxi), varargin{:}), ... + idx(nidxi), ... + setfield (hook, "f", ... + hook.f(nidxi(idx(nidxi))))), ... + df_genecstr (p, @ (p, varargin) ... + possibly_pstruct_f_genecstr ... + (p, idx(nidxe), varargin{:}), ... + idx(nidxe), ... + setfield (hook, "f", ... hook.f(nidxe(idx(nidxe)))))); else f_gencstr = f_genecstr; - df_gencstr = @ (p, idx, hook) \ - df_genecstr (p, \ - @ (p, varargin) \ - possibly_pstruct_f_genecstr \ - (p, idx, varargin{:}), \ - idx, \ + df_gencstr = @ (p, idx, hook) ... + df_genecstr (p, ... + @ (p, varargin) ... + possibly_pstruct_f_genecstr ... + (p, idx, varargin{:}), ... + idx, ... setfield (hook, "f", hook.f(idx))); endif else f_gencstr = f_genicstr; - df_gencstr = @ (p, idx, hook) \ - df_gencstr (p, \ - @ (p, varargin) \ - possibly_pstruct_f_genicstr (p, idx, varargin{:}), \ - idx, \ + df_gencstr = @ (p, idx, hook) ... + df_gencstr (p, ... + @ (p, varargin) ... + possibly_pstruct_f_genicstr (p, idx, varargin{:}), ... + idx, ... setfield (hook, "f", hook.f(idx))); endif n_gencstr = n_genicstr + n_genecstr; @@ -1267,15 +1267,15 @@ if (n_gencstr > 0) nidxl = 1:n_lincstr; nidxh = n_lincstr + 1 : n_lincstr + n_gencstr; - f_cstr = @ (p, idx, varargin) \ - cat (1, \ - mc(:, idx(nidxl)).' * p + vc(idx(nidxl), 1), \ + f_cstr = @ (p, idx, varargin) ... + cat (1, ... + mc(:, idx(nidxl)).' * p + vc(idx(nidxl), 1), ... f_gencstr (p, idx(nidxh), varargin{:})); - df_cstr = @ (p, idx, hook) \ - cat (1, \ - mc(:, idx(nidxl)).', \ - df_gencstr (p, idx(nidxh), \ - setfield (hook, "f", \ + df_cstr = @ (p, idx, hook) ... + cat (1, ... + mc(:, idx(nidxl)).', ... + df_gencstr (p, idx(nidxh), ... + setfield (hook, "f", ... hook.f(nidxh)))); else f_cstr = @ (p, idx, varargin) mc(:, idx).' * p + vc(idx, 1); @@ -1330,9 +1330,9 @@ if (pin_struct) if (pnonscalar) - p = cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ + p = cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... pord, 1); else p = cell2struct (num2cell (p), pord, 1); @@ -1382,7 +1382,7 @@ function m = hessian_struct2mat (s, pord) - m = cell2mat (fields2cell \ + m = cell2mat (fields2cell ... (structcat (1, NA, fields2cell (s, pord){:}), pord)); idx = isna (m);
--- a/main/optim/inst/optimset_compat.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/optimset_compat.m Wed Aug 28 20:24:54 2013 +0000 @@ -65,12 +65,12 @@ end ## All the option -op1 = [" DerivativeCheck Diagnostics DiffMaxChange DiffMinChange",\ - " Display GoalsExactAchieve GradConstr GradObj Hessian HessMult",\ - " HessPattern HessUpdate Jacobian JacobMult JacobPattern",\ - " LargeScale LevenbergMarquardt LineSearchType MaxFunEvals MaxIter",\ - " MaxPCGIter MeritFunction MinAbsMax PrecondBandWidth TolCon",\ - " TolFun TolPCG TolX TypicalX ",\ +op1 = [" DerivativeCheck Diagnostics DiffMaxChange DiffMinChange",... + " Display GoalsExactAchieve GradConstr GradObj Hessian HessMult",... + " HessPattern HessUpdate Jacobian JacobMult JacobPattern",... + " LargeScale LevenbergMarquardt LineSearchType MaxFunEvals MaxIter",... + " MaxPCGIter MeritFunction MinAbsMax PrecondBandWidth TolCon",... + " TolFun TolPCG TolX TypicalX ",... " MinEquiv Backend "]; opt = read_options (args, "op1",op1, "default",opt,"prefix",1,"nocase",1);
--- a/main/optim/inst/poly_2_ex.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/poly_2_ex.m Wed Aug 28 20:24:54 2013 +0000 @@ -32,7 +32,7 @@ d = (2*(f(1)*(m-1)+f(2)-f(3)*m)); if abs (d) < eps, printf ("poly_2_ex : divisor is small (solution at infinity)\n"); - printf ("%8.3e %8.3e %8.3e, %8.3e %8.3e\n",\ + printf ("%8.3e %8.3e %8.3e, %8.3e %8.3e\n",... f(1), diff (f), diff (sort (l))); ex = (2*(l(1)>l(2))-1)*inf;
--- a/main/optim/inst/private/__collect_constraints__.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/private/__collect_constraints__.m Wed Aug 28 20:24:54 2013 +0000 @@ -13,7 +13,7 @@ ## You should have received a copy of the GNU General Public License ## along with this program; If not, see <http://www.gnu.org/licenses/>. -function [mc, vc, f_gencstr, df_gencstr, user_df] = \ +function [mc, vc, f_gencstr, df_gencstr, user_df] = ... __collect_constraints__ (cstr, do_cstep, context) mc = vc = f_gencstr = df_gencstr = []; @@ -61,7 +61,7 @@ if (ischar (f_gencstr)) f_gencstr = str2func (f_gencstr); endif - f_gencstr = @ (varargin) \ + f_gencstr = @ (varargin) ... tf_gencstr (f_gencstr, varargin{:}); if (user_df) @@ -71,7 +71,7 @@ if (ischar (df_gencstr)) df_gencstr = str2func (df_gencstr); endif - df_gencstr = @ (p, func, idx, hook) \ + df_gencstr = @ (p, func, idx, hook) ... df_gencstr (p, idx, hook); else if (do_cstep)
--- a/main/optim/inst/private/__covp_corp_wls__.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/private/__covp_corp_wls__.m Wed Aug 28 20:24:54 2013 +0000 @@ -86,8 +86,8 @@ ## respective indices. In the same run, use them to further fill in ## corp as described below. for id = 1 : (cb = columns (basis)) - if (any (idx = \ - all (basis(:, (1 : cb) != id) == 0, 2) & \ + if (any (idx = ... + all (basis(:, (1 : cb) != id) == 0, 2) & ... basis(:, id) != 0)) vec = sign (basis(idx, id));
--- a/main/optim/inst/private/__lm_feasible__.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/private/__lm_feasible__.m Wed Aug 28 20:24:54 2013 +0000 @@ -75,8 +75,8 @@ ## some useful variables derived from passed variables n_lcstr = size (vc, 1); - have_constraints_except_bounds = \ - n_lcstr + n_gencstr > \ + have_constraints_except_bounds = ... + n_lcstr + n_gencstr > ... sum (lbound != -Inf) + sum (ubound != Inf); ac_idx = true (n_lcstr + n_gencstr, 1); # index of all constraints nc_idx = false (n_lcstr + n_gencstr, 1); # none of all constraints @@ -209,8 +209,8 @@ ## difference of derivatives of new and old active constraints, ## multiplied by multipliers, as used for BFGS update (lb set ## below previously) - dch = (dca_new_id(:, bidx_old_id) - \ - dca_old_id(:, bidx_old_id)) * \ + dch = (dca_new_id(:, bidx_old_id) - ... + dca_old_id(:, bidx_old_id)) * ... lb(old_l_idx); y = df - old_df - dch; @@ -314,7 +314,7 @@ hstep = mcit * chg; idx = hstep < 0; if (any (idx)) - k = min (1, min (- (vci(idx) + mcit(idx, :) * p) ./ \ + k = min (1, min (- (vci(idx) + mcit(idx, :) * p) ./ ... hstep(idx))); endif ## @@ -322,11 +322,11 @@ if (n_gencstr) c_tp = gc_idx & (c_nonbinding | c_inact); if (any (c_tp) && any (f_cstr (p + k * chg, c_tp) < 0)) - [k, fval, info] = \ - fzero (@ (x) min (cat (1, \ - f_cstr (p + x * chg, c_tp), \ - k - x, \ - ifelse (x < 0, -Inf, Inf))), \ + [k, fval, info] = ... + fzero (@ (x) min (cat (1, ... + f_cstr (p + x * chg, c_tp), ... + k - x, ... + ifelse (x < 0, -Inf, Inf))), ... 0); if (info != 1 || abs (fval) >= nz) error ("could not find stepwidth to satisfy inactive and non-binding general inequality constraints"); @@ -354,7 +354,7 @@ c_tp2 = c_binding; ## once (any(tp)==false), it would not get true again even ## with the following assignment - if (any (tp) && \ + if (any (tp) && ... any (tp = f_cstr (ptp1, c_tp1) < nz)) ## keep only the first true entry in tp tp(tp) = logical (cat (1, 1, zeros (sum (tp) - 1, 1))); @@ -366,7 +366,7 @@ cadd = caddt.'; C = dct(c_binding, :) * R * cadd; Ct = C.'; - T = [btbl, btbl * C; \ + T = [btbl, btbl * C; ... -Ct * btbl, caddt * R * cadd - Ct * btbl * C]; btbl = gjp (T, size (T, 1)); endif @@ -388,15 +388,15 @@ nt_niter--; endwhile - if (nt_nosuc || \ - any (abs (chg) > abs (p .* maxstep)) || \ + if (nt_nosuc || ... + any (abs (chg) > abs (p .* maxstep)) || ... any (f_cstr (ptp2, c_tp0) < -nz)) ## if (nt_nosuc), regaining did not converge, else, ## regaining violated type 3 and 4. nt_nosuc = true; ptp1 = (p + ptp1) / 2; endif - if (! nt_nosuc && \ + if (! nt_nosuc && ... any ((tp = f_cstr (ptp2, c_unbinding)) < 0)) [discarded, id] = min(tp); tid = find (ridx); @@ -447,7 +447,7 @@ limit = abs (maxstep(idx) .* p(idx)); chg(idx) = min (max (chg(idx), - limit), limit); if (verbose && any (ochg != chg)) - printf ("Change in parameter(s): %s:maximal fractional stepwidth enforced", \ + printf ("Change in parameter(s): %s:maximal fractional stepwidth enforced", ... sprintf ("%d ", find (ochg != chg))); endif endif # regaining
--- a/main/optim/inst/private/__nonlin_residmin__.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/private/__nonlin_residmin__.m Wed Aug 28 20:24:54 2013 +0000 @@ -22,7 +22,7 @@ ## disabled PKG_ADD: __all_opts__ ("__nonlin_residmin__"); -function [p, resid, cvg, outp] = \ +function [p, resid, cvg, outp] = ... __nonlin_residmin__ (f, pin, settings, hook) if (compare_versions (version (), "3.3.55", "<")) @@ -45,41 +45,41 @@ cstep_default = 1e-20; if (nargin == 1 && ischar (f) && strcmp (f, "defaults")) - p = optimset ("param_config", [], \ - "param_order", [], \ - "param_dims", [], \ - "f_inequc_pstruct", false, \ - "f_equc_pstruct", false, \ - "f_pstruct", false, \ - "df_inequc_pstruct", false, \ - "df_equc_pstruct", false, \ - "dfdp_pstruct", false, \ - "lbound", [], \ - "ubound", [], \ - "dfdp", [], \ - "cpiv", @ cpiv_bard, \ - "max_fract_change", [], \ - "fract_prec", [], \ - "diffp", [], \ - "diff_onesided", [], \ - "complex_step_derivative_f", false, \ - "complex_step_derivative_inequc", false, \ - "complex_step_derivative_equc", false, \ - "cstep", cstep_default, \ - "fixed", [], \ - "inequc", [], \ - "equc", [], \ - "inequc_f_idx", false, \ - "inequc_df_idx", false, \ - "equc_f_idx", false, \ - "equc_df_idx", false, \ - "weights", [], \ - "TolFun", stol_default, \ - "MaxIter", [], \ - "Display", "off", \ - "Algorithm", "lm_svd_feasible", \ - "plot_cmd", @ (f) 0, \ - "debug", false, \ + p = optimset ("param_config", [], ... + "param_order", [], ... + "param_dims", [], ... + "f_inequc_pstruct", false, ... + "f_equc_pstruct", false, ... + "f_pstruct", false, ... + "df_inequc_pstruct", false, ... + "df_equc_pstruct", false, ... + "dfdp_pstruct", false, ... + "lbound", [], ... + "ubound", [], ... + "dfdp", [], ... + "cpiv", @ cpiv_bard, ... + "max_fract_change", [], ... + "fract_prec", [], ... + "diffp", [], ... + "diff_onesided", [], ... + "complex_step_derivative_f", false, ... + "complex_step_derivative_inequc", false, ... + "complex_step_derivative_equc", false, ... + "cstep", cstep_default, ... + "fixed", [], ... + "inequc", [], ... + "equc", [], ... + "inequc_f_idx", false, ... + "inequc_df_idx", false, ... + "equc_f_idx", false, ... + "equc_df_idx", false, ... + "weights", [], ... + "TolFun", stol_default, ... + "MaxIter", [], ... + "Display", "off", ... + "Algorithm", "lm_svd_feasible", ... + "plot_cmd", @ (f) 0, ... + "debug", false, ... "lm_svd_feasible_alt_s", false); return; endif @@ -109,9 +109,9 @@ f_equc_pstruct = optimget (settings, "f_equc_pstruct", false); f_pstruct = optimget (settings, "f_pstruct", false); dfdp_pstruct = optimget (settings, "dfdp_pstruct", f_pstruct); - df_inequc_pstruct = optimget (settings, "df_inequc_pstruct", \ + df_inequc_pstruct = optimget (settings, "df_inequc_pstruct", ... f_inequc_pstruct); - df_equc_pstruct = optimget (settings, "df_equc_pstruct", \ + df_equc_pstruct = optimget (settings, "df_equc_pstruct", ... f_equc_pstruct); lbound = optimget (settings, "lbound"); ubound = optimget (settings, "ubound"); @@ -127,21 +127,21 @@ if (do_cstep && ! isempty (dfdp)) error ("both 'complex_step_derivative_f' and 'dfdp' are set"); endif - do_cstep_inequc = \ + do_cstep_inequc = ... optimget (settings, "complex_step_derivative_inequc", false); do_cstep_equc = optimget (settings, "complex_step_derivative_equc", false); - any_vector_conf = ! (isempty (lbound) && isempty (ubound) && \ - isempty (max_fract_change) && \ - isempty (fract_prec) && isempty (diffp) && \ + any_vector_conf = ! (isempty (lbound) && isempty (ubound) && ... + isempty (max_fract_change) && ... + isempty (fract_prec) && isempty (diffp) && ... isempty (diff_onesided) && isempty (fixed)); ## collect constraints - [mc, vc, f_genicstr, df_gencstr, user_df_gencstr] = \ - __collect_constraints__ (optimget (settings, "inequc"), \ + [mc, vc, f_genicstr, df_gencstr, user_df_gencstr] = ... + __collect_constraints__ (optimget (settings, "inequc"), ... do_cstep_inequc, "inequality constraints"); - [emc, evc, f_genecstr, df_genecstr, user_df_genecstr] = \ - __collect_constraints__ (optimget (settings, "equc"), \ + [emc, evc, f_genecstr, df_genecstr, user_df_genecstr] = ... + __collect_constraints__ (optimget (settings, "equc"), ... do_cstep_equc, "equality constraints"); mc_struct = isstruct (mc); emc_struct = isstruct (emc); @@ -152,13 +152,13 @@ if (isempty (f_genicstr)) f_inequc_pstruct = false; elseif (! optimget (settings, "inequc_f_idx", false)) - f_genicstr = @ (p, varargin) apply_idx_if_given \ + f_genicstr = @ (p, varargin) apply_idx_if_given ... (f_genicstr (p, varargin{:}), varargin{:}); endif if (isempty (f_genecstr)) f_equc_pstruct = false; elseif (! optimget (settings, "equc_f_idx", false)) - f_genecstr = @ (p, varargin) apply_idx_if_given \ + f_genecstr = @ (p, varargin) apply_idx_if_given ... (f_genecstr (p, varargin{:}), varargin{:}); endif if (user_df_gencstr) @@ -177,20 +177,20 @@ endif ## some settings require a parameter order - if (pin_struct || ! isempty (pconf) || f_inequc_pstruct || \ - f_equc_pstruct || f_pstruct || dfdp_pstruct || \ - df_inequc_pstruct || df_equc_pstruct || mc_struct || \ + if (pin_struct || ! isempty (pconf) || f_inequc_pstruct || ... + f_equc_pstruct || f_pstruct || dfdp_pstruct || ... + df_inequc_pstruct || df_equc_pstruct || mc_struct || ... emc_struct) if (isempty (pord)) if (pin_struct) - if (any_vector_conf || \ - ! (f_pstruct && \ - (f_inequc_pstruct || isempty (f_genicstr)) && \ - (f_equc_pstruct || isempty (f_genecstr)) && \ - (dfdp_pstruct || isempty (dfdp)) && \ - (df_inequc_pstruct || ! user_df_gencstr) && \ - (df_equc_pstruct || ! user_df_genecstr) && \ - (mc_struct || isempty (mc)) && \ + if (any_vector_conf || ... + ! (f_pstruct && ... + (f_inequc_pstruct || isempty (f_genicstr)) && ... + (f_equc_pstruct || isempty (f_genecstr)) && ... + (dfdp_pstruct || isempty (dfdp)) && ... + (df_inequc_pstruct || ! user_df_gencstr) && ... + (df_equc_pstruct || ! user_df_genecstr) && ... + (mc_struct || isempty (mc)) && ... (emc_struct || isempty (emc)))) error ("no parameter order specified and constructing a parameter order from the structure of initial parameters can not be done since not all configuration or given functions are structure based"); else @@ -209,15 +209,15 @@ endif if (isempty (pdims)) if (pin_struct) - pdims = cellfun \ + pdims = cellfun ... (@ size, fields2cell (pin, pord), "UniformOutput", false); else pdims = num2cell (ones (nnames, 2), 2); endif else pdims = pdims(:); - if (pin_struct && \ - ! all (cellfun (@ (x, y) prod (size (x)) == prod (y), \ + if (pin_struct && ... + ! all (cellfun (@ (x, y) prod (size (x)) == prod (y), ... struct2cell (pin), pdims))) error ("given param_dims and dimensions of initial parameters do not match"); endif @@ -230,13 +230,13 @@ if (any (pnel > 1)) pnonscalar = true; cpnel = num2cell (pnel); - prepidx = cat (1, cellfun \ - (@ (x, n) x(ones (1, n), 1), \ - num2cell ((1:nnames).'), cpnel, \ + prepidx = cat (1, cellfun ... + (@ (x, n) x(ones (1, n), 1), ... + num2cell ((1:nnames).'), cpnel, ... "UniformOutput", false){:}); epord = pord(prepidx, 1); - psubidx = cat (1, cellfun \ - (@ (n) (1:n).', cpnel, \ + psubidx = cat (1, cellfun ... + (@ (n) (1:n).', cpnel, ... "UniformOutput", false){:}); else pnonscalar = false; # some less expensive interfaces later @@ -259,7 +259,7 @@ plabels = num2cell (num2cell ((1:np).')); if (! isempty (pord)) - plabels = cat (2, plabels, num2cell (epord), \ + plabels = cat (2, plabels, num2cell (epord), ... num2cell (num2cell (psubidx))); endif @@ -283,7 +283,7 @@ ## supplement parameter names lacking in param_config nidx = ! isfield (pconf, pord); - pconf = cell2fields ({struct()}(ones (1, sum (nidx))), \ + pconf = cell2fields ({struct()}(ones (1, sum (nidx))), ... pord(nidx), 2, pconf); pconf = structcat (1, fields2cell (pconf, pord){:}); @@ -296,9 +296,9 @@ if (isfield (pconf, "lbound")) idx = ! fieldempty (pconf, "lbound"); if (pnonscalar) - lbound (idx(prepidx), 1) = \ - cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).lbound}.', \ + lbound (idx(prepidx), 1) = ... + cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).lbound}.', ... cpnel(idx), "UniformOutput", false){:}); else lbound(idx, 1) = cat (1, pconf.lbound); @@ -309,9 +309,9 @@ if (isfield (pconf, "ubound")) idx = ! fieldempty (pconf, "ubound"); if (pnonscalar) - ubound (idx(prepidx), 1) = \ - cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).ubound}.', \ + ubound (idx(prepidx), 1) = ... + cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).ubound}.', ... cpnel(idx), "UniformOutput", false){:}); else ubound(idx, 1) = cat (1, pconf.ubound); @@ -323,10 +323,10 @@ if (isfield (pconf, "max_fract_change")) idx = ! fieldempty (pconf, "max_fract_change"); if (pnonscalar) - max_fract_change(idx(prepidx)) = \ - cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).max_fract_change}.', \ - cpnel(idx), \ + max_fract_change(idx(prepidx)) = ... + cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).max_fract_change}.', ... + cpnel(idx), ... "UniformOutput", false){:}); else max_fract_change(idx) = [pconf.max_fract_change]; @@ -336,9 +336,9 @@ if (isfield (pconf, "fract_prec")) idx = ! fieldempty (pconf, "fract_prec"); if (pnonscalar) - fract_prec(idx(prepidx)) = \ - cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).fract_prec}.', cpnel(idx), \ + fract_prec(idx(prepidx)) = ... + cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).fract_prec}.', cpnel(idx), ... "UniformOutput", false){:}); else fract_prec(idx) = [pconf.fract_prec]; @@ -350,9 +350,9 @@ if (isfield (pconf, "diffp")) idx = ! fieldempty (pconf, "diffp"); if (pnonscalar) - diffp(idx(prepidx)) = \ - cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).diffp}.', cpnel(idx), \ + diffp(idx(prepidx)) = ... + cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).diffp}.', cpnel(idx), ... "UniformOutput", false){:}); else diffp(idx) = [pconf.diffp]; @@ -364,10 +364,10 @@ if (isfield (pconf, "diff_onesided")) idx = ! fieldempty (pconf, "diff_onesided"); if (pnonscalar) - diff_onesided(idx(prepidx)) = \ - logical \ - (cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).diff_onesided}.', cpnel(idx), \ + diff_onesided(idx(prepidx)) = ... + logical ... + (cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).diff_onesided}.', cpnel(idx), ... "UniformOutput", false){:})); else diff_onesided(idx) = logical ([pconf.diff_onesided]); @@ -377,10 +377,10 @@ if (isfield (pconf, "fixed")) idx = ! fieldempty (pconf, "fixed"); if (pnonscalar) - fixed(idx(prepidx)) = \ - logical \ - (cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).fixed}.', cpnel(idx), \ + fixed(idx(prepidx)) = ... + logical ... + (cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).fixed}.', cpnel(idx), ... "UniformOutput", false){:})); else fixed(idx) = logical ([pconf.fixed]); @@ -456,8 +456,8 @@ ## initial parameters if (pin_struct) if (pnonscalar) - pin = cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - fields2cell (pin, pord), cpnel, \ + pin = cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + fields2cell (pin, pord), cpnel, ... "UniformOutput", false){:}); else pin = cat (1, fields2cell (pin, pord){:}); @@ -467,13 +467,13 @@ ## model function if (f_pstruct) if (pnonscalar) - f = @ (p, varargin) \ - f (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ + f = @ (p, varargin) ... + f (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... pord, 1), varargin{:}); else - f = @ (p, varargin) \ + f = @ (p, varargin) ... f (cell2struct (num2cell (p), pord, 1), varargin{:}); endif endif @@ -496,19 +496,19 @@ endif if (dfdp_pstruct) if (pnonscalar) - dfdp = @ (p, hook) \ - cat (2, \ - fields2cell \ - (dfdp (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ - pord, 1), hook), \ + dfdp = @ (p, hook) ... + cat (2, ... + fields2cell ... + (dfdp (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... + pord, 1), hook), ... pord){:}); else - dfdp = @ (p, hook) \ - cat (2, \ - fields2cell \ - (dfdp (cell2struct (num2cell (p), pord, 1), hook), \ + dfdp = @ (p, hook) ... + cat (2, ... + fields2cell ... + (dfdp (cell2struct (num2cell (p), pord, 1), hook), ... pord){:}); endif endif @@ -516,14 +516,14 @@ ## function for general inequality constraints if (f_inequc_pstruct) if (pnonscalar) - f_genicstr = @ (p, varargin) \ - f_genicstr (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ + f_genicstr = @ (p, varargin) ... + f_genicstr (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... pord, 1), varargin{:}); else - f_genicstr = @ (p, varargin) \ - f_genicstr \ + f_genicstr = @ (p, varargin) ... + f_genicstr ... (cell2struct (num2cell (p), pord, 1), varargin{:}); endif endif @@ -534,21 +534,21 @@ ## jacobian of general inequality constraints if (df_inequc_pstruct) if (pnonscalar) - df_gencstr = @ (p, func, idx, hook) \ - cat (2, \ - fields2cell \ - (df_gencstr \ - (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), pord, 1), \ - func, idx, hook), \ + df_gencstr = @ (p, func, idx, hook) ... + cat (2, ... + fields2cell ... + (df_gencstr ... + (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), pord, 1), ... + func, idx, hook), ... pord){:}); else - df_gencstr = @ (p, func, idx, hook) \ - cat (2, \ - fields2cell \ - (df_gencstr (cell2struct (num2cell (p), pord, 1), \ - func, idx, hook), \ + df_gencstr = @ (p, func, idx, hook) ... + cat (2, ... + fields2cell ... + (df_gencstr (cell2struct (num2cell (p), pord, 1), ... + func, idx, hook), ... pord){:}); endif endif @@ -556,14 +556,14 @@ ## function for general equality constraints if (f_equc_pstruct) if (pnonscalar) - f_genecstr = @ (p, varargin) \ - f_genecstr (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ + f_genecstr = @ (p, varargin) ... + f_genecstr (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... pord, 1), varargin{:}); else - f_genecstr = @ (p, varargin) \ - f_genecstr \ + f_genecstr = @ (p, varargin) ... + f_genecstr ... (cell2struct (num2cell (p), pord, 1), varargin{:}); endif endif @@ -574,21 +574,21 @@ ## jacobian of general equality constraints if (df_equc_pstruct) if (pnonscalar) - df_genecstr = @ (p, func, idx, hook) \ - cat (2, \ - fields2cell \ - (df_genecstr \ - (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), pord, 1), \ - func, idx, hook), \ + df_genecstr = @ (p, func, idx, hook) ... + cat (2, ... + fields2cell ... + (df_genecstr ... + (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), pord, 1), ... + func, idx, hook), ... pord){:}); else - df_genecstr = @ (p, func, idx, hook) \ - cat (2, \ - fields2cell \ - (df_genecstr (cell2struct (num2cell (p), pord, 1), \ - func, idx, hook), \ + df_genecstr = @ (p, func, idx, hook) ... + cat (2, ... + fields2cell ... + (df_genecstr (cell2struct (num2cell (p), pord, 1), ... + func, idx, hook), ... pord){:}); endif endif @@ -618,29 +618,29 @@ ## parameter-related configuration for jacobian functions if (dfdp_pstruct || df_inequc_pstruct || df_equc_pstruct) if(pnonscalar) - s_diffp = cell2struct \ - (cellfun (@ reshape, mat2cell (diffp, ppartidx), \ + s_diffp = cell2struct ... + (cellfun (@ reshape, mat2cell (diffp, ppartidx), ... pdims, "UniformOutput", false), pord, 1); - s_diff_onesided = cell2struct \ - (cellfun (@ reshape, mat2cell (diff_onesided, ppartidx), \ + s_diff_onesided = cell2struct ... + (cellfun (@ reshape, mat2cell (diff_onesided, ppartidx), ... pdims, "UniformOutput", false), pord, 1); - s_orig_lbound = cell2struct \ - (cellfun (@ reshape, mat2cell (lbound, ppartidx), \ + s_orig_lbound = cell2struct ... + (cellfun (@ reshape, mat2cell (lbound, ppartidx), ... pdims, "UniformOutput", false), pord, 1); - s_orig_ubound = cell2struct \ - (cellfun (@ reshape, mat2cell (ubound, ppartidx), \ + s_orig_ubound = cell2struct ... + (cellfun (@ reshape, mat2cell (ubound, ppartidx), ... pdims, "UniformOutput", false), pord, 1); - s_plabels = cell2struct \ - (num2cell \ - (cat (2, cellfun \ - (@ (x) cellfun \ - (@ reshape, mat2cell (cat (1, x{:}), ppartidx), \ - pdims, "UniformOutput", false), \ - num2cell (plabels, 1), "UniformOutput", false){:}), \ - 2), \ + s_plabels = cell2struct ... + (num2cell ... + (cat (2, cellfun ... + (@ (x) cellfun ... + (@ reshape, mat2cell (cat (1, x{:}), ppartidx), ... + pdims, "UniformOutput", false), ... + num2cell (plabels, 1), "UniformOutput", false){:}), ... + 2), ... pord, 1); - s_orig_fixed = cell2struct \ - (cellfun (@ reshape, mat2cell (fixed, ppartidx), \ + s_orig_fixed = cell2struct ... + (cellfun (@ reshape, mat2cell (fixed, ppartidx), ... pdims, "UniformOutput", false), pord, 1); else s_diffp = cell2struct (num2cell (diffp), pord, 1); @@ -749,32 +749,32 @@ nonfixed = ! fixed; if (any (fixed)) ## backend (returned values and initial parameters) - backend = @ (f, pin, hook) \ + backend = @ (f, pin, hook) ... backend_wrapper (backend, fixed, f, pin, hook); ## model function f = @ (p, varargin) f (assign (pin, nonfixed, p), varargin{:}); ## jacobian of model function - dfdp = @ (p, hook) \ + dfdp = @ (p, hook) ... dfdp (assign (pin, nonfixed, p), hook)(:, nonfixed); ## function for general inequality constraints - f_genicstr = @ (p, varargin) \ + f_genicstr = @ (p, varargin) ... f_genicstr (assign (pin, nonfixed, p), varargin{:}); ## jacobian of general inequality constraints - df_gencstr = @ (p, func, idx, hook) \ - df_gencstr (assign (pin, nonfixed, p), func, idx, hook) \ + df_gencstr = @ (p, func, idx, hook) ... + df_gencstr (assign (pin, nonfixed, p), func, idx, hook) ... (:, nonfixed); ## function for general equality constraints - f_genecstr = @ (p, varargin) \ + f_genecstr = @ (p, varargin) ... f_genecstr (assign (pin, nonfixed, p), varargin{:}); ## jacobian of general equality constraints - df_genecstr = @ (p, func, idx, hook) \ - df_genecstr (assign (pin, nonfixed, p), func, idx, hook) \ + df_genecstr = @ (p, func, idx, hook) ... + df_genecstr (assign (pin, nonfixed, p), func, idx, hook) ... (:, nonfixed); ## linear inequality constraints @@ -798,67 +798,67 @@ ## jacobian of model function if (dfdp_pstruct) - dfdp = @ (p, hook) \ - dfdp (p, cell2fields \ - ({s_diffp, s_diff_onesided, s_orig_lbound, \ - s_orig_ubound, s_plabels, \ - cell2fields(num2cell(hook.fixed), pord(nonfixed), \ - 1, s_orig_fixed), cstep}, \ - {"diffp", "diff_onesided", "lbound", "ubound", \ - "plabels", "fixed", "h"}, \ + dfdp = @ (p, hook) ... + dfdp (p, cell2fields ... + ({s_diffp, s_diff_onesided, s_orig_lbound, ... + s_orig_ubound, s_plabels, ... + cell2fields(num2cell(hook.fixed), pord(nonfixed), ... + 1, s_orig_fixed), cstep}, ... + {"diffp", "diff_onesided", "lbound", "ubound", ... + "plabels", "fixed", "h"}, ... 2, hook)); else - dfdp = @ (p, hook) \ - dfdp (p, cell2fields \ - ({diffp, diff_onesided, orig_lbound, orig_ubound, \ - plabels, assign(orig_fixed, nonfixed, hook.fixed), \ - cstep}, \ - {"diffp", "diff_onesided", "lbound", "ubound", \ - "plabels", "fixed", "h"}, \ + dfdp = @ (p, hook) ... + dfdp (p, cell2fields ... + ({diffp, diff_onesided, orig_lbound, orig_ubound, ... + plabels, assign(orig_fixed, nonfixed, hook.fixed), ... + cstep}, ... + {"diffp", "diff_onesided", "lbound", "ubound", ... + "plabels", "fixed", "h"}, ... 2, hook)); endif ## jacobian of general inequality constraints if (df_inequc_pstruct) - df_gencstr = @ (p, func, idx, hook) \ - df_gencstr (p, func, idx, cell2fields \ - ({s_diffp, s_diff_onesided, s_orig_lbound, \ - s_orig_ubound, s_plabels, \ - cell2fields(num2cell(hook.fixed), pord(nonfixed), \ - 1, s_orig_fixed), cstep}, \ - {"diffp", "diff_onesided", "lbound", "ubound", \ - "plabels", "fixed", "h"}, \ + df_gencstr = @ (p, func, idx, hook) ... + df_gencstr (p, func, idx, cell2fields ... + ({s_diffp, s_diff_onesided, s_orig_lbound, ... + s_orig_ubound, s_plabels, ... + cell2fields(num2cell(hook.fixed), pord(nonfixed), ... + 1, s_orig_fixed), cstep}, ... + {"diffp", "diff_onesided", "lbound", "ubound", ... + "plabels", "fixed", "h"}, ... 2, hook)); else - df_gencstr = @ (p, func, idx, hook) \ - df_gencstr (p, func, idx, cell2fields \ - ({diffp, diff_onesided, orig_lbound, \ - orig_ubound, plabels, \ - assign(orig_fixed, nonfixed, hook.fixed), cstep}, \ - {"diffp", "diff_onesided", "lbound", "ubound", \ - "plabels", "fixed", "h"}, \ + df_gencstr = @ (p, func, idx, hook) ... + df_gencstr (p, func, idx, cell2fields ... + ({diffp, diff_onesided, orig_lbound, ... + orig_ubound, plabels, ... + assign(orig_fixed, nonfixed, hook.fixed), cstep}, ... + {"diffp", "diff_onesided", "lbound", "ubound", ... + "plabels", "fixed", "h"}, ... 2, hook)); endif ## jacobian of general equality constraints if (df_equc_pstruct) - df_genecstr = @ (p, func, idx, hook) \ - df_genecstr (p, func, idx, cell2fields \ - ({s_diffp, s_diff_onesided, s_orig_lbound, \ - s_orig_ubound, s_plabels, \ - cell2fields(num2cell(hook.fixed), pord(nonfixed), \ - 1, s_orig_fixed), cstep}, \ - {"diffp", "diff_onesided", "lbound", "ubound", \ - "plabels", "fixed", "h"}, \ + df_genecstr = @ (p, func, idx, hook) ... + df_genecstr (p, func, idx, cell2fields ... + ({s_diffp, s_diff_onesided, s_orig_lbound, ... + s_orig_ubound, s_plabels, ... + cell2fields(num2cell(hook.fixed), pord(nonfixed), ... + 1, s_orig_fixed), cstep}, ... + {"diffp", "diff_onesided", "lbound", "ubound", ... + "plabels", "fixed", "h"}, ... 2, hook)); else - df_genecstr = @ (p, func, idx, hook) \ - df_genecstr (p, func, idx, cell2fields \ - ({diffp, diff_onesided, orig_lbound, \ - orig_ubound, plabels, \ - assign(orig_fixed, nonfixed, hook.fixed), cstep}, \ - {"diffp", "diff_onesided", "lbound", "ubound", \ - "plabels", "fixed", "h"}, \ + df_genecstr = @ (p, func, idx, hook) ... + df_genecstr (p, func, idx, cell2fields ... + ({diffp, diff_onesided, orig_lbound, ... + orig_ubound, plabels, ... + assign(orig_fixed, nonfixed, hook.fixed), cstep}, ... + {"diffp", "diff_onesided", "lbound", "ubound", ... + "plabels", "fixed", "h"}, ... 2, hook)); endif @@ -881,41 +881,41 @@ if (n_genicstr > 0) nidxi = 1 : n_genicstr; nidxe = n_genicstr + 1 : n_genicstr + n_genecstr; - f_gencstr = @ (p, idx, varargin) \ - cat (1, \ - f_genicstr (p, idx(nidxi), varargin{:}), \ + f_gencstr = @ (p, idx, varargin) ... + cat (1, ... + f_genicstr (p, idx(nidxi), varargin{:}), ... f_genecstr (p, idx(nidxe), varargin{:})); - df_gencstr = @ (p, idx, hook) \ - cat (1, \ - df_gencstr (p, @ (p, varargin) \ - possibly_pstruct_f_genicstr \ - (p, idx(nidxi), varargin{:}), \ - idx(nidxi), \ - setfield (hook, "f", \ - hook.f(nidxi(idx(nidxi))))), \ - df_genecstr (p, @ (p, varargin) \ - possibly_pstruct_f_genecstr \ - (p, idx(nidxe), varargin{:}), \ - idx(nidxe), \ - setfield (hook, "f", \ + df_gencstr = @ (p, idx, hook) ... + cat (1, ... + df_gencstr (p, @ (p, varargin) ... + possibly_pstruct_f_genicstr ... + (p, idx(nidxi), varargin{:}), ... + idx(nidxi), ... + setfield (hook, "f", ... + hook.f(nidxi(idx(nidxi))))), ... + df_genecstr (p, @ (p, varargin) ... + possibly_pstruct_f_genecstr ... + (p, idx(nidxe), varargin{:}), ... + idx(nidxe), ... + setfield (hook, "f", ... hook.f(nidxe(idx(nidxe)))))); else f_gencstr = f_genecstr; - df_gencstr = @ (p, idx, hook) \ - df_genecstr (p, \ - @ (p, varargin) \ - possibly_pstruct_f_genecstr \ - (p, idx, varargin{:}), \ - idx, \ + df_gencstr = @ (p, idx, hook) ... + df_genecstr (p, ... + @ (p, varargin) ... + possibly_pstruct_f_genecstr ... + (p, idx, varargin{:}), ... + idx, ... setfield (hook, "f", hook.f(idx))); endif else f_gencstr = f_genicstr; - df_gencstr = @ (p, idx, hook) \ - df_gencstr (p, \ - @ (p, varargin) \ - possibly_pstruct_f_genicstr (p, idx, varargin{:}), \ - idx, \ + df_gencstr = @ (p, idx, hook) ... + df_gencstr (p, ... + @ (p, varargin) ... + possibly_pstruct_f_genicstr (p, idx, varargin{:}), ... + idx, ... setfield (hook, "f", hook.f(idx))); endif n_gencstr = n_genicstr + n_genecstr; @@ -925,15 +925,15 @@ if (n_gencstr > 0) nidxl = 1:n_lincstr; nidxh = n_lincstr + 1 : n_lincstr + n_gencstr; - f_cstr = @ (p, idx, varargin) \ - cat (1, \ - mc(:, idx(nidxl)).' * p + vc(idx(nidxl), 1), \ + f_cstr = @ (p, idx, varargin) ... + cat (1, ... + mc(:, idx(nidxl)).' * p + vc(idx(nidxl), 1), ... f_gencstr (p, idx(nidxh), varargin{:})); - df_cstr = @ (p, idx, hook) \ - cat (1, \ - mc(:, idx(nidxl)).', \ - df_gencstr (p, idx(nidxh), \ - setfield (hook, "f", \ + df_cstr = @ (p, idx, hook) ... + cat (1, ... + mc(:, idx(nidxl)).', ... + df_gencstr (p, idx(nidxh), ... + setfield (hook, "f", ... hook.f(nidxh)))); else f_cstr = @ (p, idx, varargin) mc(:, idx).' * p + vc(idx, 1); @@ -985,9 +985,9 @@ if (pin_struct) if (pnonscalar) - p = cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ + p = cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... pord, 1); else p = cell2struct (num2cell (p), pord, 1);
--- a/main/optim/inst/private/__residmin_stat__.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/private/__residmin_stat__.m Wed Aug 28 20:24:54 2013 +0000 @@ -49,24 +49,24 @@ cstep_default = 1e-20; if (nargin == 1 && ischar (f) && strcmp (f, "defaults")) - ret = optimset ("param_config", [], \ - "param_order", [], \ - "param_dims", [], \ - "f_pstruct", false, \ - "dfdp_pstruct", false, \ - "dfdp", [], \ - "diffp", [], \ - "diff_onesided", [], \ - "complex_step_derivative", false, \ - "cstep", cstep_default, \ - "fixed", [], \ - "weights", [], \ - "residuals", [], \ - "covd", [], \ - "objf", [], \ # no default, e.g. "wls" - "ret_dfdp", false, \ - "ret_covd", false, \ - "ret_covp", false, \ + ret = optimset ("param_config", [], ... + "param_order", [], ... + "param_dims", [], ... + "f_pstruct", false, ... + "dfdp_pstruct", false, ... + "dfdp", [], ... + "diffp", [], ... + "diff_onesided", [], ... + "complex_step_derivative", false, ... + "cstep", cstep_default, ... + "fixed", [], ... + "weights", [], ... + "residuals", [], ... + "covd", [], ... + "objf", [], ... # no default, e.g. "wls" + "ret_dfdp", false, ... + "ret_covd", false, ... + "ret_covp", false, ... "ret_corp", false); return; endif @@ -107,7 +107,7 @@ error ("both 'complex_step_derivative' and 'dfdp' are set"); endif - any_vector_conf = ! (isempty (diffp) && isempty (diff_onesided) && \ + any_vector_conf = ! (isempty (diffp) && isempty (diff_onesided) && ... isempty (fixed)); ## correct "_pstruct" settings if functions are not supplied @@ -118,8 +118,8 @@ if (p_struct || ! isempty (pconf) || f_pstruct || dfdp_pstruct) if (isempty (pord)) if (p_struct) - if (any_vector_conf || \ - ! ((f_pstruct || isempty (f)) && \ + if (any_vector_conf || ... + ! ((f_pstruct || isempty (f)) && ... (dfdp_pstruct || isempty (dfdp)))) error ("no parameter order specified and constructing a parameter order from the structure of parameters can not be done since not all configuration or given functions are structure based"); else @@ -138,15 +138,15 @@ endif if (isempty (pdims)) if (p_struct) - pdims = cellfun \ + pdims = cellfun ... (@ size, fields2cell (pfin, pord), "UniformOutput", false); else pdims = num2cell (ones (nnames, 2), 2); endif else pdims = pdims(:); - if (p_struct && \ - ! all (cellfun (@ (x, y) prod (size (x)) == prod (y), \ + if (p_struct && ... + ! all (cellfun (@ (x, y) prod (size (x)) == prod (y), ... struct2cell (pfin), pdims))) error ("given param_dims and dimensions of parameters do not match"); endif @@ -159,13 +159,13 @@ if (any (pnel > 1)) pnonscalar = true; cpnel = num2cell (pnel); - prepidx = cat (1, cellfun \ - (@ (x, n) x(ones (1, n), 1), \ - num2cell ((1:nnames).'), cpnel, \ + prepidx = cat (1, cellfun ... + (@ (x, n) x(ones (1, n), 1), ... + num2cell ((1:nnames).'), cpnel, ... "UniformOutput", false){:}); epord = pord(prepidx, 1); - psubidx = cat (1, cellfun \ - (@ (n) (1:n).', cpnel, \ + psubidx = cat (1, cellfun ... + (@ (n) (1:n).', cpnel, ... "UniformOutput", false){:}); else pnonscalar = false; # some less expensive interfaces later @@ -185,14 +185,14 @@ error ("number of initial parameters not correct"); endif endif - if (ismatrix (dfdp) && ! ischar (dfdp) && ! isempty (dfdp) && \ + if (ismatrix (dfdp) && ! ischar (dfdp) && ! isempty (dfdp) && ... np == 0) np = columns (dfdp); endif plabels = num2cell (num2cell ((1:np).')); if (! isempty (pord)) - plabels = cat (2, plabels, num2cell (epord), \ + plabels = cat (2, plabels, num2cell (epord), ... num2cell (num2cell (psubidx))); endif @@ -214,7 +214,7 @@ ## supplement parameter names lacking in param_config nidx = ! isfield (pconf, pord); - pconf = cell2fields ({struct()}(ones (1, sum (nidx))), \ + pconf = cell2fields ({struct()}(ones (1, sum (nidx))), ... pord(nidx), 2, pconf); pconf = structcat (1, fields2cell (pconf, pord){:}); @@ -228,9 +228,9 @@ if (isfield (pconf, "diffp")) idx = ! fieldempty (pconf, "diffp"); if (pnonscalar) - diffp(idx(prepidx)) = \ - cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).diffp}.', cpnel(idx), \ + diffp(idx(prepidx)) = ... + cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).diffp}.', cpnel(idx), ... "UniformOutput", false){:}); else diffp(idx) = [pconf.diffp]; @@ -242,10 +242,10 @@ if (isfield (pconf, "diff_onesided")) idx = ! fieldempty (pconf, "diff_onesided"); if (pnonscalar) - diff_onesided(idx(prepidx)) = \ - logical \ - (cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).diff_onesided}.', cpnel(idx), \ + diff_onesided(idx(prepidx)) = ... + logical ... + (cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).diff_onesided}.', cpnel(idx), ... "UniformOutput", false){:})); else diff_onesided(idx) = logical ([pconf.diff_onesided]); @@ -255,10 +255,10 @@ if (isfield (pconf, "fixed")) idx = ! fieldempty (pconf, "fixed"); if (pnonscalar) - fixed(idx(prepidx)) = \ - logical \ - (cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - {pconf(idx).fixed}.', cpnel(idx), \ + fixed(idx(prepidx)) = ... + logical ... + (cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + {pconf(idx).fixed}.', cpnel(idx), ... "UniformOutput", false){:})); else fixed(idx) = logical ([pconf.fixed]); @@ -305,8 +305,8 @@ ## parameters if (p_struct) if (pnonscalar) - pfin = cat (1, cellfun (@ (x, n) reshape (x, n, 1), \ - fields2cell (pfin, pord), cpnel, \ + pfin = cat (1, cellfun (@ (x, n) reshape (x, n, 1), ... + fields2cell (pfin, pord), cpnel, ... "UniformOutput", false){:}); else pfin = cat (1, fields2cell (pfin, pord){:}); @@ -316,13 +316,13 @@ ## model function if (f_pstruct) if (pnonscalar) - f = @ (p, varargin) \ - f (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ + f = @ (p, varargin) ... + f (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... pord, 1), varargin{:}); else - f = @ (p, varargin) \ + f = @ (p, varargin) ... f (cell2struct (num2cell (p), pord, 1), varargin{:}); endif endif @@ -362,19 +362,19 @@ endif if (dfdp_pstruct) if (pnonscalar) - dfdp = @ (p, hook) \ - cat (2, \ - fields2cell \ - (dfdp (cell2struct \ - (cellfun (@ reshape, mat2cell (p, ppartidx), \ - pdims, "UniformOutput", false), \ - pord, 1), hook), \ + dfdp = @ (p, hook) ... + cat (2, ... + fields2cell ... + (dfdp (cell2struct ... + (cellfun (@ reshape, mat2cell (p, ppartidx), ... + pdims, "UniformOutput", false), ... + pord, 1), hook), ... pord){:}); else - dfdp = @ (p, hook) \ - cat (2, \ - fields2cell \ - (dfdp (cell2struct (num2cell (p), pord, 1), hook), \ + dfdp = @ (p, hook) ... + cat (2, ... + fields2cell ... + (dfdp (cell2struct (num2cell (p), pord, 1), hook), ... pord){:}); endif endif @@ -382,23 +382,23 @@ ## parameter-related configuration for jacobian function if (dfdp_pstruct) if(pnonscalar) - s_diffp = cell2struct \ - (cellfun (@ reshape, mat2cell (diffp, ppartidx), \ + s_diffp = cell2struct ... + (cellfun (@ reshape, mat2cell (diffp, ppartidx), ... pdims, "UniformOutput", false), pord, 1); - s_diff_onesided = cell2struct \ - (cellfun (@ reshape, mat2cell (diff_onesided, ppartidx), \ + s_diff_onesided = cell2struct ... + (cellfun (@ reshape, mat2cell (diff_onesided, ppartidx), ... pdims, "UniformOutput", false), pord, 1); - s_plabels = cell2struct \ - (num2cell \ - (cat (2, cellfun \ - (@ (x) cellfun \ - (@ reshape, mat2cell (cat (1, x{:}), ppartidx), \ - pdims, "UniformOutput", false), \ - num2cell (plabels, 1), "UniformOutput", false){:}), \ - 2), \ + s_plabels = cell2struct ... + (num2cell ... + (cat (2, cellfun ... + (@ (x) cellfun ... + (@ reshape, mat2cell (cat (1, x{:}), ppartidx), ... + pdims, "UniformOutput", false), ... + num2cell (plabels, 1), "UniformOutput", false){:}), ... + 2), ... pord, 1); - s_orig_fixed = cell2struct \ - (cellfun (@ reshape, mat2cell (fixed, ppartidx), \ + s_orig_fixed = cell2struct ... + (cellfun (@ reshape, mat2cell (fixed, ppartidx), ... pdims, "UniformOutput", false), pord, 1); else s_diffp = cell2struct (num2cell (diffp), pord, 1); @@ -486,7 +486,7 @@ ## jacobian of model function if (! isempty (dfdp)) - dfdp = @ (p, hook) \ + dfdp = @ (p, hook) ... dfdp (assign (pfin, nonfixed, p), hook)(:, nonfixed); endif @@ -494,17 +494,17 @@ #### supplement constants to jacobian function if (dfdp_pstruct) - dfdp = @ (p, hook) \ - dfdp (p, cell2fields \ - ({s_diffp, s_diff_onesided, s_plabels, s_fixed, cstep}, \ - {"diffp", "diff_onesided", "plabels", "fixed", "h"}, \ + dfdp = @ (p, hook) ... + dfdp (p, cell2fields ... + ({s_diffp, s_diff_onesided, s_plabels, s_fixed, cstep}, ... + {"diffp", "diff_onesided", "plabels", "fixed", "h"}, ... 2, hook)); else if (! isempty (dfdp)) - dfdp = @ (p, hook) \ - dfdp (p, cell2fields \ - ({diffp, diff_onesided, plabels, fixed, cstep}, \ - {"diffp", "diff_onesided", "plabels", "fixed", "h"}, \ + dfdp = @ (p, hook) ... + dfdp (p, cell2fields ... + ({diffp, diff_onesided, plabels, fixed, cstep}, ... + {"diffp", "diff_onesided", "plabels", "fixed", "h"}, ... 2, hook)); endif endif @@ -596,7 +596,7 @@ funs.covd = str2func ("__covd_wls__"); funs.covp_corp = str2func ("__covp_corp_wls__"); otherwise - error ("no statistics implemented for objective function '%s'", \ + error ("no statistics implemented for objective function '%s'", ... objf); endswitch
--- a/main/optim/inst/private/__siman__.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/private/__siman__.m Wed Aug 28 20:24:54 2013 +0000 @@ -133,14 +133,14 @@ ividx = (ac(ineq_idx) < 0); if (any (evidx) || any (ividx)) nv = sum (evidx) + sum (ividx); - if (sum (lbvidx = (new_p < lbound)) + \ - sum (ubvidx = (new_p > ubound)) == \ + if (sum (lbvidx = (new_p < lbound)) + ... + sum (ubvidx = (new_p > ubound)) == ... nv) ## special case only bounds violated, set back to bound new_p(lbvidx) = lbound(lbvidx); new_p(ubvidx) = ubound(ubvidx); - elseif (nv == 1 && \ - sum (t_eq = (abs (ac(leq_idx)) >= nz)) + \ + elseif (nv == 1 && ... + sum (t_eq = (abs (ac(leq_idx)) >= nz)) + ... sum (t_inequ = (ac(lineq_idx) < 0)) == 1) ## special case only one linear constraint violated, set ## back perpendicularly to constraint @@ -155,18 +155,18 @@ ## 'new_p' minimal, using quadratic programming, or ## sequential quadratic programming for nonlinear ## constraints - [new_p, discarded, sqp_info] = \ - sqp (new_p, \ - {@(x)sumsq(x-new_p), \ - @(x)2*(x-new_p), \ - @(x)sqp_hessian}, \ - {@(x)f_cstr(x,eq_idx), \ - @(x)df_cstr(x,eq_idx, \ - setfield(hook,"f", \ - f_cstr(x,ac_idx)))}, \ - {@(x)f_cstr(x,ineq_idx), \ - @(x)df_cstr(x,ineq_idx, \ - setfield(hook,"f", \ + [new_p, discarded, sqp_info] = ... + sqp (new_p, ... + {@(x)sumsq(x-new_p), ... + @(x)2*(x-new_p), ... + @(x)sqp_hessian}, ... + {@(x)f_cstr(x,eq_idx), ... + @(x)df_cstr(x,eq_idx, ... + setfield(hook,"f", ... + f_cstr(x,ac_idx)))}, ... + {@(x)f_cstr(x,ineq_idx), ... + @(x)df_cstr(x,ineq_idx, ... + setfield(hook,"f", ... f_cstr(x,ac_idx)))}); if (sqp_info != 101) cvg = 0; @@ -177,7 +177,7 @@ endif else n_retry_constr = 0; - while (any (abs ((ac = f_cstr (new_p, ac_idx))(eq_idx)) >= nz) \ + while (any (abs ((ac = f_cstr (new_p, ac_idx))(eq_idx)) >= nz) ... || any (ac(ineq_idx) < 0)) new_p = p + max_rand_step .* (2 * rand (sizep) - 1); n_retry_constr++;
--- a/main/optim/inst/test_d2_min_2.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/test_d2_min_2.m Wed Aug 28 20:24:54 2013 +0000 @@ -90,7 +90,7 @@ if verbose, printf("d2_min should find in one iteration + one more to check\n"); - printf(["d2_min : niter=%-4d nev=%-4d nobs=%-4d nparams=%-4d\n",\ + printf(["d2_min : niter=%-4d nev=%-4d nobs=%-4d nparams=%-4d\n",... " time=%-8.3g errx=%-8.3g minv=%-8.3g\n"],... nev([2,1]), R, P, tlev, max (abs (xlev-truep)), vlev); end
--- a/main/optim/inst/test_min_1.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/test_min_1.m Wed Aug 28 20:24:54 2013 +0000 @@ -23,10 +23,10 @@ if ! exist ("verbose"), verbose = 0; end if verbose - printf ("\n Testing '%s' on a quadratic programming problem\n\n",\ + printf ("\n Testing '%s' on a quadratic programming problem\n\n",... optim_func); - printf ([" Set 'optim_func' to the name of the optimization\n",\ - " function you want to test (must have same synopsis\n",\ + printf ([" Set 'optim_func' to the name of the optimization\n",... + " function you want to test (must have same synopsis\n",... " as 'bfgs')\n\n"]); end @@ -65,8 +65,8 @@ xinit = 10*randn(N,1) ; if verbose, - printf ([" Dimension is %i\n",\ - " Condition is %f\n"],\ + printf ([" Dimension is %i\n",... + " Condition is %f\n"],... N, cond (metric)); fflush (stdout); end @@ -81,7 +81,7 @@ [x,v,niter] = feval (optim_func, "testfunc", xinit2, ctl); if verbose - printf ("nev=%d N=%d errx=%8.3g errv=%8.3g\n",\ + printf ("nev=%d N=%d errx=%8.3g errv=%8.3g\n",... niter(1),N,max(abs( x-truemin )),v-offset); end
--- a/main/optim/inst/test_min_2.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/test_min_2.m Wed Aug 28 20:24:54 2013 +0000 @@ -80,8 +80,8 @@ if verbose printf ("\n Testing %s on a quadratic problem\n\n", optim_func); - printf ([" Set 'optim_func' to the name of the optimization\n",\ - " function you want to test (must have same synopsis\n",\ + printf ([" Set 'optim_func' to the name of the optimization\n",... + " function you want to test (must have same synopsis\n",... " as 'bfgs')\n\n"]); printf (" Nparams = P = %i, Nobses = R = %i\n",P,R); @@ -111,7 +111,7 @@ end if verbose, - printf (" Costs : init=%8.3g, final=%8.3g, best=%8.3g\n",\ + printf (" Costs : init=%8.3g, final=%8.3g, best=%8.3g\n",... ff(xinit), vlev, ff(truep)); end if verbose
--- a/main/optim/inst/test_min_3.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/test_min_3.m Wed Aug 28 20:24:54 2013 +0000 @@ -65,8 +65,8 @@ if verbose printf (" Checking that extra arguments are accepted\n\n"); - printf ([" Set 'optim_func' to the name of the optimization\n",\ - " function you want to test (must have same synopsis\n",\ + printf ([" Set 'optim_func' to the name of the optimization\n",... + " function you want to test (must have same synopsis\n",... " as 'bfgs')\n\n"]); printf (" Tested function : %s\n",optim_func); @@ -88,7 +88,7 @@ if strcmp(optim_func,"bfgsmin") ctl = {-1,2,1,1}; endif -[xlev,vlev,nlev] = feval \ +[xlev,vlev,nlev] = feval ... (optim_func, "ff", {xinit, obsmat, obses}, ctl); tlev = mytic() ; @@ -100,7 +100,7 @@ ok = 0; end if verbose, - printf (" Costs : init=%8.3g, final=%8.3g, best=%8.3g\n",\ + printf (" Costs : init=%8.3g, final=%8.3g, best=%8.3g\n",... ff(xinit,obsmat,obses), vlev, ff(truep,obsmat,obses)); end if verbose
--- a/main/optim/inst/test_min_4.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/test_min_4.m Wed Aug 28 20:24:54 2013 +0000 @@ -52,11 +52,11 @@ if verbose - printf ("\n Testing that %s accepts struct control variable\n\n",\ + printf ("\n Testing that %s accepts struct control variable\n\n",... optim_func); - printf ([" Set 'optim_func' to the name of the optimization\n",\ - " function you want to test (must have same synopsis\n",\ + printf ([" Set 'optim_func' to the name of the optimization\n",... + " function you want to test (must have same synopsis\n",... " as 'bfgsmin')\n\n"]); printf (" Nparams = N = %i\n",N);
--- a/main/optim/inst/test_nelder_mead_min_2.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/test_nelder_mead_min_2.m Wed Aug 28 20:24:54 2013 +0000 @@ -22,7 +22,7 @@ if ! exist ("inspect"), inspect = 0; end if verbose, - printf (["test_nelder_mead_2\n",\ + printf (["test_nelder_mead_2\n",... " Check whether nelder_mead_min accepts options properly\n\n"]); end
--- a/main/optim/inst/test_wpolyfit.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/test_wpolyfit.m Wed Aug 28 20:24:54 2013 +0000 @@ -169,7 +169,7 @@ ##Data: y x -data = [ \ +data = [ ... .11019 150000 .21956 300000 .32949 450000 @@ -215,7 +215,7 @@ ## ## Standard Deviation ## Estimate of Estimate -target = [ \ +target = [ ... 0.673565789473684E-03 0.107938612033077E-03 0.732059160401003E-06 0.157817399981659E-09 -0.316081871345029E-14 0.486652849992036E-16 ]; @@ -235,7 +235,7 @@ # y = B1*x + e #Data: y x -data =[\ +data =[... 130 60 131 61 132 62 @@ -253,7 +253,7 @@ # # Standard Deviation # Estimate of Estimate -target = [ \ +target = [ ... 0 0 2.07438016528926 0.165289256198347E-01 ]; @@ -278,7 +278,7 @@ # # Standard Deviation # Parameter Estimate of Estimate -target = [\ +target = [... 1.00000000000000 0.000000000000000 1.00000000000000 0.000000000000000 1.00000000000000 0.000000000000000 @@ -287,7 +287,7 @@ 1.00000000000000 0.000000000000000 ]; #Data: y x -data = [\ +data = [... 1 0 6 1 63 2 @@ -327,7 +327,7 @@ ## Certified Regression Statistics ## Standard Deviation ## Parameter Estimate of Estimate -target = [ \ +target = [ ... 1.00000000000000 0.000000000000000 0.100000000000000 0.000000000000000 0.100000000000000E-01 0.000000000000000 @@ -337,7 +337,7 @@ #Data: y x -data = [ \ +data = [ ... 1.00000 0 1.11111 1 1.24992 2 @@ -382,7 +382,7 @@ ## ## Standard Deviation ## Parameter Estimate of Estimate -target = [\ +target = [... 1.00000000000000 2152.32624678170 1.00000000000000 2363.55173469681 1.00000000000000 779.343524331583 @@ -391,7 +391,7 @@ 1.00000000000000 0.112324854679312 ]; #Data: y x -data = [ \ +data = [ ... 760. 0 -2042. 1 2111. 2 @@ -427,7 +427,7 @@ ## ## Standard Deviation ## Parameter Estimate of Estimate -target = [\ +target = [... 1.00000000000000 215232.624678170 1.00000000000000 236355.173469681 1.00000000000000 77934.3524331583 @@ -436,7 +436,7 @@ 1.00000000000000 11.2324854679312 ]; #Data: y x -data = [\ +data = [... 75901 0 -204794 1 204863 2 @@ -475,7 +475,7 @@ ## ## Standard Deviation ## Parameter Estimate of Estimate -target = [\ +target = [... 1.00000000000000 21523262.4678170 1.00000000000000 23635517.3469681 1.00000000000000 7793435.24331583 @@ -484,7 +484,7 @@ 1.00000000000000 1123.24854679312 ]; ##Data: y x -data = [ \ +data = [ ... 7590001 0 -20479994 1 20480063 2
--- a/main/optim/inst/vfzero.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/optim/inst/vfzero.m Wed Aug 28 20:24:54 2013 +0000 @@ -87,7 +87,7 @@ ## Get default options if requested. if (nargin == 1 && ischar (fun) && strcmp (fun, 'defaults')) - x = optimset ("MaxIter", Inf, "MaxFunEvals", Inf, "TolX", 1e-8, \ + x = optimset ("MaxIter", Inf, "MaxFunEvals", Inf, "TolX", 1e-8, ... "OutputFcn", [], "FunValCheck", "off"); return; endif @@ -195,7 +195,7 @@ type1idx &= not_ready; exclidx = type1idx; ## Secant step. - idx = type1idx & \ + idx = type1idx & ... (tidx = abs (fa) <= 1e3*abs (fb) & abs (fb) <= 1e3*abs (fa)); c(idx) = u(idx) - (a(idx) - b(idx)) ./ (fa(idx) - fb(idx)) .* fu(idx); ## Bisection step. @@ -207,7 +207,7 @@ ## itype == 2 or 3 type23idx = not_ready & ! exclidx & (itype == 2 | itype == 3); exclidx |= type23idx; - uidx = cellfun (@ (x) length (unique (x)), \ + uidx = cellfun (@ (x) length (unique (x)), ... num2cell ([fa, fb, fd, fe], 2)) == 4; oidx = sign (c - a) .* sign (c - b) > 0; ## Inverse cubic interpolation. @@ -236,8 +236,8 @@ for i = 1:3 tidx &= i <= itype; taidx = tidx(idx); - pc = a0(taidx)(:) + (a1(taidx)(:) + \ - a2(taidx)(:).*(c(tidx) - b(tidx))(:)) \ + pc = a0(taidx)(:) + (a1(taidx)(:) + ... + a2(taidx)(:).*(c(tidx) - b(tidx))(:)) ... .*(c(tidx) - a(tidx))(:); pdc = a1(taidx)(:) + a2(taidx)(:).*(2*c(tidx) - a(tidx) - b(tidx))(:); tidx0 = tidx; @@ -272,7 +272,7 @@ nidx = not_ready & ! (idx = b - a <= 2*delta); idx &= not_ready; c(idx) = (a(idx) + b(idx))/2; - c(nidx) = max (a(nidx) + delta(nidx), \ + c(nidx) = max (a(nidx) + delta(nidx), ... min (b(nidx) - delta(nidx), c(nidx))); ## Calculate new point. @@ -338,8 +338,8 @@ ## Check solution for a singularity by examining slope idx = not_ready & info == 1 & (b - a) != 0; - idx(idx, 1) &= \ - abs ((fb(idx, 1) - fa(idx, 1))./(b(idx, 1) - a(idx, 1)) \ + idx(idx, 1) &= ... + abs ((fb(idx, 1) - fa(idx, 1))./(b(idx, 1) - a(idx, 1)) ... ./ slope0(idx, 1)) > max (1e6, 0.5/(eps+tolx)); info(idx) = - 5;
--- a/main/plot/inst/calc_shading.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/plot/inst/calc_shading.m Wed Aug 28 20:24:54 2013 +0000 @@ -51,7 +51,7 @@ ## Created: 2009-12-24 ## Credits: Kai Habel for his diffuse, specular and surfl functions -function [ cdat ] = calc_shading (amb, dif, spec, shine, \ +function [ cdat ] = calc_shading (amb, dif, spec, shine, ... colors, normals, lvec, vvec) lvec /= norm (lvec); # normalize light vector @@ -68,19 +68,19 @@ if columns (colors) == 1 ## if we have scalar colors do it the simple way - lfactor = amb * ones (rows (normals), 1) \ - + dif * diffuse (normals(:, 1), normals(:, 2), normals(:, 3), lvec) \ - + spec * specular (normals(:, 1), normals(:, 2), normals(:, 3), \ + lfactor = amb * ones (rows (normals), 1) ... + + dif * diffuse (normals(:, 1), normals(:, 2), normals(:, 3), lvec) ... + + spec * specular (normals(:, 1), normals(:, 2), normals(:, 3), ... lvec, vvec, shine); cdat = colors .* lfactor; else # we have rgb colors ## ambient and diffuse like in the scalar case - lfactor = amb * ones (rows (normals), 1) \ + lfactor = amb * ones (rows (normals), 1) ... + dif * diffuse (normals(:, 1), normals(:, 2), normals(:, 3), lvec); lfactor = repmat (lfactor, [1, columns(colors)]); ## we use a white specular light for a better effect - lf_spec = spec * specular (normals(:, 1), normals(:, 2), normals(:, 3), \ + lf_spec = spec * specular (normals(:, 1), normals(:, 2), normals(:, 3), ... lvec, vvec, shine); lf_spec = repmat (lf_spec, [1, columns(colors)]);
--- a/main/plot/inst/dxfwrite.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/plot/inst/dxfwrite.m Wed Aug 28 20:24:54 2013 +0000 @@ -143,7 +143,7 @@ layspec = sprintf("8\nCurve%d\n", nb); ## List of vertex - fprintf(fid, ["0\nVERTEX\n", layspec, \ + fprintf(fid, ["0\nVERTEX\n", layspec, ... "10\n",FMT,"\n", "20\n",FMT,"\n", "30\n",FMT,"\n"], pl.'); ## End of polyline
--- a/main/queueing/devel/qnclosedsinglecmva.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/devel/qnclosedsinglecmva.m Wed Aug 28 20:24:54 2013 +0000 @@ -114,13 +114,13 @@ print_usage(); endif - isscalar(N) && N >= 0 || \ + isscalar(N) && N >= 0 || ... error( "N must be >= 0" ); - isvector(S) || \ + isvector(S) || ... error( "S must be a vector" ); S = S(:)'; # make S a row vector - isvector(V) || \ + isvector(V) || ... error( "V must be a vector" ); V = V(:)'; # make V a row vector @@ -129,23 +129,23 @@ if ( nargin < 4 ) m = ones(1,K); else - isvector(m) || \ + isvector(m) || ... error( "m must be a vector" ); m = m(:)'; # make m a row vector endif [err S V m] = common_size(S, V, m); - (err == 0) || \ + (err == 0) || ... error( "S, V and m are of incompatible size" ); - all(S>=0) || \ + all(S>=0) || ... error( "S must be a vector >= 0" ); - all(V>=0) || \ + all(V>=0) || ... error( "V must be a vector >= 0" ); if ( nargin < 5 ) Z = 0; else - (isscalar(Z) && Z >= 0) || \ + (isscalar(Z) && Z >= 0) || ... error( "Z must be >= 0" ); endif
--- a/main/queueing/devel/qnmmmk_alt.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/devel/qnmmmk_alt.m Wed Aug 28 20:24:54 2013 +0000 @@ -124,11 +124,11 @@ ( isvector(lambda) && isvector(mu) && isvector(m) && isvector(k) ) || ... error( "lambda, mu, m, k must be vectors of the same size" ); - all( k>0 ) || \ + all( k>0 ) || ... error( "k must be strictly positive" ); - all( m>0 ) && all( m <= k ) || \ + all( m>0 ) && all( m <= k ) || ... error( "m must be in the range 1:k" ); - all( lambda>0 ) && all( mu>0 ) || \ + all( lambda>0 ) && all( mu>0 ) || ... error( "lambda and mu must be >0" ); rho = lambda ./ mu;
--- a/main/queueing/devel/qnopenmultig.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/devel/qnopenmultig.m Wed Aug 28 20:24:54 2013 +0000 @@ -97,28 +97,28 @@ print_usage(); endif - ismatrix(l0) || \ + ismatrix(l0) || ... usage("lambda must be a matrix"); C = rows(l0); K = columns(l0); - size(c20) == size(l0) || \ + size(c20) == size(l0) || ... usage("c20 must have the same size of lambda"); - size(mu) == size(l0) || \ + size(mu) == size(l0) || ... usage("mu must have the same size of lambda"); - size(c2) == size(l0) || \ + size(c2) == size(l0) || ... usage("c2 must have the same size of lambda"); - ismatrix(P) && ndims(P) == 4 && [C,K,C,K] == size(P) || \ + ismatrix(P) && ndims(P) == 4 && [C,K,C,K] == size(P) || ... usage("Wrong size of matrix P (I was expecting %dx%dx%dx%d)", C, K, C, K); if ( nargin < 6 ) m = ones(1,K); else - ( isvector( m ) && length(m) == K && all( m >= 1 ) ) || \ + ( isvector( m ) && length(m) == K && all( m >= 1 ) ) || ... usage( "m must be >= 1" ); m = m(:)'; # make m a row vector endif
--- a/main/queueing/doc/demo_web.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/doc/demo_web.m Wed Aug 28 20:24:54 2013 +0000 @@ -23,7 +23,7 @@ N = 100; # total population size beta = linspace(0.1,0.9,18); # population mix for class 1 -D = [12 14 23 20 80 31; \ +D = [12 14 23 20 80 31; ... 2 20 14 90 30 33 ]; V = ones(size(D)); X1 = X1 = XX = zeros(size(beta)); @@ -46,13 +46,13 @@ set(gcf,"paperposition", [margin papersize-margin*2]); subplot(2,1,1); -plot(beta, X1, "--", "linewidth", 2, \ - beta, X2, ":", "linewidth", 2, \ +plot(beta, X1, "--", "linewidth", 2, ... + beta, X2, ":", "linewidth", 2, ... beta, XX, "-", "linewidth", 2 ); ylabel("Throughput"); subplot(2,1,2); -plot(beta, R1, "--", "linewidth", 2, \ - beta, R2, ":", "linewidth", 2, \ +plot(beta, R1, "--", "linewidth", 2, ... + beta, R2, ":", "linewidth", 2, ... beta, RR, "-", "linewidth", 2 ); ax = axis(); ax(3) = 0; @@ -71,8 +71,8 @@ set(gcf,"papersize",papersize); set(gcf,"paperposition", [margin papersize-margin*2]); -plot(beta, X1./R1, "--;Class 1;", "linewidth", 2, \ - beta, X2./R2, ":;Class 2;", "linewidth", 2, \ +plot(beta, X1./R1, "--;Class 1;", "linewidth", 2, ... + beta, X2./R2, ":;Class 2;", "linewidth", 2, ... beta, XX./RR, "-;System;", "linewidth", 2); xlabel("Population mix \\beta_1 for Class 1"); ylabel("Power");
--- a/main/queueing/doc/munge-texi.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/doc/munge-texi.m Wed Aug 28 20:24:54 2013 +0000 @@ -27,7 +27,7 @@ ############################################################################## function dump_help(func) text = get_help_text(func); - !isempty(text) || \ + !isempty(text) || ... error("Help text for %s not found", func); ## from __makeinfo__.m in Octave @@ -46,7 +46,7 @@ ############################################################################## function dump_demo( func, n ) [code, idx] = test (func, "grabdemo" ); - (n <= length(idx)) || \ + (n <= length(idx)) || ... error("Demo not found"); printf("@verbatim\n%s\n@end verbatim\n",code(idx(n)+1:idx(n+1)-1)); endfunction
--- a/main/queueing/inst/ctmc.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/ctmc.m Wed Aug 28 20:24:54 2013 +0000 @@ -90,7 +90,7 @@ [N err] = ctmcchkQ(Q); - ( N>0 ) || \ + ( N>0 ) || ... error(err); if ( nargin == 1 ) # steady-state analysis @@ -116,10 +116,10 @@ else # transient analysis - ( isscalar(t) && t>=0 ) || \ + ( isscalar(t) && t>=0 ) || ... error("t must be a scalar >= 0"); - ( isvector(p0) && length(p0) == N && all(p0>=0) && abs(sum(p0)-1.0)<N*eps ) || \ + ( isvector(p0) && length(p0) == N && all(p0>=0) && abs(sum(p0)-1.0)<N*eps ) || ... error( "p0 must be a probability vector" ); p0 = p0(:)'; # make p0 a row vector
--- a/main/queueing/inst/ctmcbd.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/ctmcbd.m Wed Aug 28 20:24:54 2013 +0000 @@ -77,15 +77,15 @@ print_usage(); endif - ( isvector( birth ) && isvector( death ) ) || \ + ( isvector( birth ) && isvector( death ) ) || ... error( "birth and death must be vectors" ); birth = birth(:); # make birth a column vector death = death(:); # make death a column vector - size_equal( birth, death ) || \ + size_equal( birth, death ) || ... error( "birth and death rates must have the same length" ); - all( birth >= 0 ) || \ + all( birth >= 0 ) || ... error( "birth rates must be >= 0" ); - all( death >= 0 ) || \ + all( death >= 0 ) || ... error( "death rates must be >= 0" ); ## builds the infinitesimal generator matrix
--- a/main/queueing/inst/ctmcchkQ.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/ctmcchkQ.m Wed Aug 28 20:24:54 2013 +0000 @@ -47,7 +47,7 @@ return; endif - if (any(Q(~logical(eye(size(Q))))<0) || \ # there is any negative non-diagonal element + if (any(Q(~logical(eye(size(Q))))<0) || ... # there is any negative non-diagonal element norm( sum(Q,2), "inf" ) > epsilon ) err = "Q is not an infinitesimal generator matrix"; return;
--- a/main/queueing/inst/ctmcexps.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/ctmcexps.m Wed Aug 28 20:24:54 2013 +0000 @@ -80,7 +80,7 @@ [N err] = ctmcchkQ(Q); - (N>0) || \ + (N>0) || ... error(err); if ( nargin == 2 ) @@ -90,14 +90,14 @@ p = varargin{2}; endif - ( isvector(p) && length(p) == size(Q,1) && all(p>=0) && abs(sum(p)-1.0)<epsilon ) || \ + ( isvector(p) && length(p) == size(Q,1) && all(p>=0) && abs(sum(p)-1.0)<epsilon ) || ... error( "p must be a probability vector" ); p = p(:)'; # make p a row vector if ( nargin == 3 ) # non-absorbing case if ( isscalar(t) ) - (t >= 0 ) || \ + (t >= 0 ) || ... error( "t must be >= 0" ); ## F(x) are the transient state occupancy probabilities at time x ## F(x) = p*expm(Q*x) (see function ctmc()). @@ -105,7 +105,7 @@ L = quadv(F,0,t); else ## FIXME: deprecate this? - ( isvector(t) && abs(t(1)) < epsilon ) || \ + ( isvector(t) && abs(t(1)) < epsilon ) || ... error( "t must be a vector, and t(1) must be 0.0" ); t = t(:)'; # make tt a row vector ff = @(x,t) (x(:)'*Q+p);
--- a/main/queueing/inst/ctmcfpt.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/ctmcfpt.m Wed Aug 28 20:24:54 2013 +0000 @@ -78,7 +78,7 @@ [N err] = ctmcchkQ(Q); - (N>0) || \ + (N>0) || ... error(err); if ( nargin == 1 )
--- a/main/queueing/inst/ctmcmtta.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/ctmcmtta.m Wed Aug 28 20:24:54 2013 +0000 @@ -72,10 +72,10 @@ [N err] = ctmcchkQ(Q); - (N>0) || \ + (N>0) || ... error(err); - ( isvector(p) && length(p) == N && all(p>=0) && abs(sum(p)-1.0)<epsilon ) || \ + ( isvector(p) && length(p) == N && all(p>=0) && abs(sum(p)-1.0)<epsilon ) || ... error( "p must be a probability vector" ); p = p(:)';
--- a/main/queueing/inst/dtmc.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/dtmc.m Wed Aug 28 20:24:54 2013 +0000 @@ -87,22 +87,22 @@ [N err] = dtmcchkP(P); - ( N>0 ) || \ + ( N>0 ) || ... error( err ); if ( nargin == 1 ) # steady-state analysis A = P-eye(N); A(:,N) = 1; # add normalization condition - rank( A ) == N || \ + rank( A ) == N || ... warning( "dtmc(): P is reducible" ); b = [ zeros(1,N-1) 1 ]; p = b/A; else # transient analysis - ( isscalar(n) && n>=0 ) || \ + ( isscalar(n) && n>=0 ) || ... error( "n must be >=0" ); - ( isvector(p0) && length(p0) == N && all(p0>=0) && abs(sum(p0)-1.0)<N*eps ) || \ + ( isvector(p0) && length(p0) == N && all(p0>=0) && abs(sum(p0)-1.0)<N*eps ) || ... error( "p0 must be a probability vector" ); p0 = p0(:)'; # make p0 a row vector
--- a/main/queueing/inst/dtmcbd.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/dtmcbd.m Wed Aug 28 20:24:54 2013 +0000 @@ -78,17 +78,17 @@ print_usage(); endif - ( isvector( b ) && isvector( d ) ) || \ + ( isvector( b ) && isvector( d ) ) || ... error( "birth and death must be vectors" ); b = b(:); # make b a column vector d = d(:); # make d a column vector - size_equal( b, d ) || \ + size_equal( b, d ) || ... error( "birth and death vectors must have the same length" ); - all( b >= 0 ) || \ + all( b >= 0 ) || ... error( "birth probabilities must be >= 0" ); - all( d >= 0 ) || \ + all( d >= 0 ) || ... error( "death probabilities must be >= 0" ); - all( ([b; 0] + [0; d]) <= 1 ) || \ + all( ([b; 0] + [0; d]) <= 1 ) || ... error( "d(i)+b(i+1) must be <= 1"); P = diag( b, 1 ) + diag( d, -1 );
--- a/main/queueing/inst/dtmcexps.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/dtmcexps.m Wed Aug 28 20:24:54 2013 +0000 @@ -76,7 +76,7 @@ [K err] = dtmcchkP(P); - (K>0) || \ + (K>0) || ... error(err); if ( nargin == 2 ) @@ -86,13 +86,13 @@ p0 = varargin{2}; endif - ( isvector(p0) && length(p0) == K && all(p0>=0) && abs(sum(p0)-1.0)<epsilon ) || \ + ( isvector(p0) && length(p0) == K && all(p0>=0) && abs(sum(p0)-1.0)<epsilon ) || ... error( "p0 must be a state occupancy probability vector" ); p0 = p0(:)'; # make p0 a row vector if ( nargin == 3 ) - isscalar(n) && n>=0 || \ + isscalar(n) && n>=0 || ... error("n must be >=0"); n = fix(n); L = zeros(sizeof(p0));
--- a/main/queueing/inst/dtmcfpt.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/dtmcfpt.m Wed Aug 28 20:24:54 2013 +0000 @@ -69,7 +69,7 @@ [N err] = dtmcchkP(P); - ( N>0 ) || \ + ( N>0 ) || ... error(err); if ( any(diag(P) == 1) )
--- a/main/queueing/inst/dtmcmtta.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/dtmcmtta.m Wed Aug 28 20:24:54 2013 +0000 @@ -93,11 +93,11 @@ [K err] = dtmcchkP(P); - (K>0) || \ + (K>0) || ... error(err); if ( nargin == 2 ) - ( isvector(p0) && length(p0) == K && all(p0>=0) && abs(sum(p0)-1.0)<epsilon ) || \ + ( isvector(p0) && length(p0) == K && all(p0>=0) && abs(sum(p0)-1.0)<epsilon ) || ... error( "p0 must be a state occupancy probability vector" ); endif
--- a/main/queueing/inst/private/expn.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/private/expn.m Wed Aug 28 20:24:54 2013 +0000 @@ -23,9 +23,9 @@ ## ## @end deftypefn function r = expn( a, n ) - n>=0 || \ + n>=0 || ... error("n must be nonnegative"); - a>0 || \ + a>0 || ... error("a must be positive"); tmp = cumprod( [1 a./(1:n)] ); r = tmp(n+1);
--- a/main/queueing/inst/private/sumexpn.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/private/sumexpn.m Wed Aug 28 20:24:54 2013 +0000 @@ -41,9 +41,9 @@ ## ## @end deftypefn function r = sumexpn( a, n ) - n>=0 || \ + n>=0 || ... error("n must be nonnegative"); - a>0 || \ + a>0 || ... error("a must be positive"); r = sum(cumprod([1 a./(1:n)])); endfunction
--- a/main/queueing/inst/qncmaba.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncmaba.m Wed Aug 28 20:24:54 2013 +0000 @@ -96,7 +96,7 @@ [err N S V m Z] = qncmchkparam( varargin{:} ); isempty(err) || error(err); - all(m<=1) || \ + all(m<=1) || ... error("Multiple-server nodes are not supported"); if ( sum(N) == 0 ) # handle trivial case of empty network
--- a/main/queueing/inst/qncmbsb.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncmbsb.m Wed Aug 28 20:24:54 2013 +0000 @@ -79,10 +79,10 @@ [err N S V m Z] = qncmchkparam( varargin{:} ); isempty(err) || error(err); - all(m<=1) || \ + all(m<=1) || ... error("Multiple-server nodes are not supported"); - all(Z == 0 ) || \ + all(Z == 0 ) || ... error("This function only supports Z=0"); if ( sum(N) == 0 ) # handle trivial case of empty network
--- a/main/queueing/inst/qncmcb.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncmcb.m Wed Aug 28 20:24:54 2013 +0000 @@ -82,10 +82,10 @@ [err N S V m Z] = qncmchkparam( varargin{:} ); isempty(err) || error(err); - all(m == 1) || \ + all(m == 1) || ... error("this function only supports single-server FCFS centers"); - all(Z == 0) || \ + all(Z == 0) || ... error("this function does not support think time"); [C K] = size(S);
--- a/main/queueing/inst/qncmmva.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncmmva.m Wed Aug 28 20:24:54 2013 +0000 @@ -205,16 +205,16 @@ print_usage(); endif - isvector(N) && all( N>=0 ) || \ + isvector(N) && all( N>=0 ) || ... error( "N must be >=0" ); N = N(:)'; # make N a row vector C = length(N); ## Number of classes - ( ndims(S) == 2 ) || \ + ( ndims(S) == 2 ) || ... error( "S must be a matrix" ); K = columns(S); ## Number of service centers - size(S) == [C,K] || \ + size(S) == [C,K] || ... error( "S size mismatch (is %dx%d, should be %dx%d)", rows(S), columns(S), C, K ); - ndims(P) == 4 && size(P) == [C,K,C,K] || \ + ndims(P) == 4 && size(P) == [C,K,C,K] || ... error( "P size mismatch (should be %dx%dx%dx%d)",C,K,C,K ); if ( nargin < 4 ) @@ -225,29 +225,29 @@ r = r*ones(1,C); endif - ( isvector(r) && length(r) == C ) || \ + ( isvector(r) && length(r) == C ) || ... error("r must be a vector with %d elements", C); r = r(:)'; - all( r>=1 && r<=K ) || \ + all( r>=1 && r<=K ) || ... error("elements of r are out of range [1,%d]",K); endif if ( nargin < 5 ) m = ones(1,K); else - isvector(m) || \ + isvector(m) || ... error( "m must be a vector" ); m = m(:)'; # make m a row vector - length(m) == K || \ + length(m) == K || ... error( "m size mismatch (should be %d, is %d)", K, length(m) ); endif ## Check consistency of parameters - all(S(:) >= 0) || \ + all(S(:) >= 0) || ... error( "S must be >= 0" ); - all( any(S>0,2) ) || \ + all( any(S>0,2) ) || ... error( "S must contain at least a value >0 for each row" ); - all(P(:)>= 0) || \ + all(P(:)>= 0) || ... error( "P must be >=0" ); U = R = Q = X = zeros(C,K); @@ -321,7 +321,7 @@ assert( nargin == 5 ); - all( any(S>0,2) ) || \ + all( any(S>0,2) ) || ... error( "S must contain at least a value >0 for each row" ); [C K] = size(S); @@ -329,7 +329,7 @@ ## ensure that the service times for multiserver nodes ## are class-independent for k=find(m>1) - all( S(:,k) == S(1,k) ) || \ + all( S(:,k) == S(1,k) ) || ... error( "Service times for FCFS node %d are not class-independent", k ); endfor
--- a/main/queueing/inst/qncmmvaap.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncmmvaap.m Wed Aug 28 20:24:54 2013 +0000 @@ -136,33 +136,33 @@ print_usage(); endif - isvector(N) && all( N>=0 ) || \ + isvector(N) && all( N>=0 ) || ... error( "N must be a vector of positive integers" ); N = N(:)'; # make N a row vector C = length(N); ## Number of classes K = columns(S); ## Number of service centers - size(S) == [C,K] || \ + size(S) == [C,K] || ... error( "S size mismatch" ); - size(V) == [C,K] || \ + size(V) == [C,K] || ... error( "V size mismatch" ); if ( nargin < 4 || isempty(m) ) m = ones(1,K); else - isvector(m) || \ + isvector(m) || ... error( "m must be a vector"); m = m(:)'; # make m a row vector - ( length(m) == K && all( m <= 1 ) ) || \ + ( length(m) == K && all( m <= 1 ) ) || ... error( "m must be <= 1 and have %d elements", K ); endif if ( nargin < 5 || isempty(Z) ) Z = zeros(1,C); else - isvector(Z) || \ + isvector(Z) || ... error( "Z must be a vector" ); Z = Z(:)'; # make Z a row vector - ( length(Z) == C && all(Z >= 0 ) ) || \ + ( length(Z) == C && all(Z >= 0 ) ) || ... error( "Z must be >= 0 and have %d elements", C ); endif @@ -175,9 +175,9 @@ endif ## Check consistency of parameters - all(S(:) >= 0) || \ + all(S(:) >= 0) || ... error( "S contains negative values" ); - all(V(:) >= 0) || \ + all(V(:) >= 0) || ... error( "V contains negative values" ); ## Initialize results
--- a/main/queueing/inst/qncmnpop.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncmnpop.m Wed Aug 28 20:24:54 2013 +0000 @@ -56,7 +56,7 @@ ## Web: http://www.moreno.marzolla.name/ function H = qncmnpop( N ) - (isvector(N) && all( N > 0 ) ) || \ + (isvector(N) && all( N > 0 ) ) || ... error( "N must be a vector of strictly positive integers" ); N = N(:)'; # make N a row vector Ns = sum(N);
--- a/main/queueing/inst/qncmpopmix.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncmpopmix.m Wed Aug 28 20:24:54 2013 +0000 @@ -83,10 +83,10 @@ print_usage(); endif - isvector( population ) && all( population>=0 ) || \ + isvector( population ) && all( population>=0 ) || ... error( "N must be an array >=0" ); R = length(population); # number of classes - ( isscalar(k) && k >= 0 && k <= sum(population) ) || \ + ( isscalar(k) && k >= 0 && k <= sum(population) ) || ... error( "k must be a scalar <= %d", sum(population)); N = zeros(1, R); const = min(k, population);
--- a/main/queueing/inst/qncmvisits.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncmvisits.m Wed Aug 28 20:24:54 2013 +0000 @@ -71,19 +71,19 @@ print_usage(); endif - ndims(P) == 4 || \ + ndims(P) == 4 || ... error("P must be a 4-dimensional matrix"); [C, K, C2, K2] = size( P ); - (K == K2 && C == C2) || \ + (K == K2 && C == C2) || ... error( "P must be a [C,K,C,K] matrix"); if ( nargin < 2) r = ones(1,C); else - isvector(r) && length(r) == C || \ + isvector(r) && length(r) == C || ... error("r must be a vector with %d elements",C); - all( r>=1 && r<=K ) || \ + all( r>=1 && r<=K ) || ... error("elements in r must be in the range 1 - %d",K); r = r(:)'; endif @@ -104,7 +104,7 @@ if ( chains(c) == 0 ) chains(c) = CH(c,k); else - ( CH(c,k) == 0 || chains(c) == CH(c,k) ) || \ + ( CH(c,k) == 0 || chains(c) == CH(c,k) ) || ... error("Class %d belongs to different chains",c); endif endfor
--- a/main/queueing/inst/qncsaba.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncsaba.m Wed Aug 28 20:24:54 2013 +0000 @@ -94,7 +94,7 @@ [err N S V m Z] = qncschkparam( varargin{:} ); isempty(err) || error(err); - all(m<=1) || \ + all(m<=1) || ... error( "multiple server nodes are not supported" ); D = S.*V;
--- a/main/queueing/inst/qncsbsb.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncsbsb.m Wed Aug 28 20:24:54 2013 +0000 @@ -126,7 +126,7 @@ [err N S V m Z] = qncschkparam( varargin{:} ); isempty(err) || error(err); - all(m==1) || \ + all(m==1) || ... error( "this function supports M/M/1 servers only" ); D = S .* V;
--- a/main/queueing/inst/qncscmva.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncscmva.m Wed Aug 28 20:24:54 2013 +0000 @@ -100,32 +100,32 @@ print_usage(); endif - isscalar(N) && N >= 0 || \ + isscalar(N) && N >= 0 || ... error("N must be a positive scalar"); - (isempty(S) || isvector(S)) || \ + (isempty(S) || isvector(S)) || ... error("S must be a vector"); S = S(:)'; # make S a row vector M = length(S)+1; # total number of service centers (excluding the delay center) - isvector(Sld) && length(Sld) == N && all(Sld>=0) || \ + isvector(Sld) && length(Sld) == N && all(Sld>=0) || ... error("Sld must be a vector with %d elements >= 0", N); Sld = Sld(:)'; # Make Sld a row vector - isvector(V) && length(V) == M && all(V>=0) || \ + isvector(V) && length(V) == M && all(V>=0) || ... error("V must be a vector with %d elements", M); V = V(:)'; # Make V a row vector ## The reference paper assumes queue M (LD center) as reference. ## Therefore, we need to rescale V - V(M) > 0 || \ + V(M) > 0 || ... error("V(M) must be >0"); V = V / V(M); if ( nargin == 5 ) - isscalar(Z) && Z>=0 || \ + isscalar(Z) && Z>=0 || ... error("Z must be nonnegative"); else Z = 0;
--- a/main/queueing/inst/qncsconv.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncsconv.m Wed Aug 28 20:24:54 2013 +0000 @@ -197,7 +197,7 @@ ## Applications", Wiley, 1998. This function has been vectorized, ## and accepts a vector as parameter j. function result = F(i,j,v,S,m) - isscalar(i) || \ + isscalar(i) || ... error( "i must be a scalar" ); k_i = j; if ( m(i) == 1 )
--- a/main/queueing/inst/qncsconvld.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncsconvld.m Wed Aug 28 20:24:54 2013 +0000 @@ -92,17 +92,17 @@ print_usage(); endif - ( isscalar(N) && N>0 ) || \ + ( isscalar(N) && N>0 ) || ... error( "N must be a positive scalar" ); K = N; # To be compliant with the reference, we denote K as the population size - ( isvector(V) && all(V>=0) ) || \ + ( isvector(V) && all(V>=0) ) || ... error( "V must be a vector >=0" ); V = V(:)'; # Make V a row vector N = length(V); # Number of service centers if ( isnumeric(S) ) - ( rows(S) == N && columns(S) == K) || \ + ( rows(S) == N && columns(S) == K) || ... error( sprintf("S size mismatch: is %dx%d, should be %dx%d", rows(S), columns(S),K,N ) ); - all(S(:)>=0) || \ + all(S(:)>=0) || ... error( "S must be >=0" ); endif
--- a/main/queueing/inst/qncsgb.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncsgb.m Wed Aug 28 20:24:54 2013 +0000 @@ -105,10 +105,10 @@ isempty(err) || error(err); ## This function requires N>0 - N > 0 || \ + N > 0 || ... error( "N must be >0" ); - all(m==1) || \ + all(m==1) || ... error("this function only supports single server nodes"); L = S .* V;
--- a/main/queueing/inst/qncsmvaap.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncsmvaap.m Wed Aug 28 20:24:54 2013 +0000 @@ -117,11 +117,11 @@ print_usage(); endif - isscalar(N) && N >= 0 || \ + isscalar(N) && N >= 0 || ... error( "N must be >= 0" ); - isvector(S) || \ + isvector(S) || ... error( "S must be a vector" ); - isvector(V) || \ + isvector(V) || ... error( "V must be a vector" ); S = S(:)'; # make S a row vector V = V(:)'; # make V a row vector @@ -131,39 +131,39 @@ if ( nargin < 4 ) m = ones(1,K); else - isvector(m) || \ + isvector(m) || ... error( "m must be a vector" ); m = m(:)'; # make m a row vector endif [err S V m] = common_size(S, V, m); - (err == 0) || \ + (err == 0) || ... error( "S, V and m are of incompatible size" ); - all(S>=0) || \ + all(S>=0) || ... error( "S must be a vector >= 0" ); - all(V>=0) || \ + all(V>=0) || ... error( "V must be a vector >= 0" ); - all(m<=1) || \ + all(m<=1) || ... error( "Vector m must be <= 1 (this function supports IS and single-server nodes only)" ); if ( nargin < 5 ) Z = 0; else - (isscalar(Z) && Z >= 0) || \ + (isscalar(Z) && Z >= 0) || ... error( "Z must be >= 0" ); endif if ( nargin < 6 ) tol = 1e-5; else - ( isscalar(tol) && tol>0 ) || \ + ( isscalar(tol) && tol>0 ) || ... error("tol must be a positive scalar"); endif if ( nargin < 7 ) iter_max = 100; else - ( isscalar(iter_max) && iter_max > 0 ) || \ + ( isscalar(iter_max) && iter_max > 0 ) || ... error("iter_max must be a positive integer"); endif
--- a/main/queueing/inst/qncsmvablo.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncsmvablo.m Wed Aug 28 20:24:54 2013 +0000 @@ -89,26 +89,26 @@ if ( nargin != 4 ) print_usage(); endif - ( isscalar(K) && K > 0 ) || \ + ( isscalar(K) && K > 0 ) || ... error( "K must be a positive integer" ); - isvector(S) && all(S>0) || \ + isvector(S) && all(S>0) || ... error ("S must be a vector > 0"); S = S(:)'; # make S a row vector N = length(S); - ( isvector(M) && length(M) == N ) || \ + ( isvector(M) && length(M) == N ) || ... error( "M must be a vector with %d elements", N ); - all( M >= 1) || \ + all( M >= 1) || ... error( "M must be >= 1"); M = M(:)'; # make M a row vector - (K < sum(M)) || \ + (K < sum(M)) || ... error( "The population size K=%d exceeds the total system capacity %d", K, sum(M) ); [na err] = dtmcchkP(P); - ( na>0 ) || \ + ( na>0 ) || ... error( err ); - rows(P) == N || \ + rows(P) == N || ... error("The number of rows of P must be equal to the length of S"); ## Note: in this implementation we make use of the same notation found
--- a/main/queueing/inst/qncsmvald.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncsmvald.m Wed Aug 28 20:24:54 2013 +0000 @@ -96,21 +96,21 @@ print_usage(); endif - isvector(V) && all(V>=0) || \ + isvector(V) && all(V>=0) || ... error( "V must be a vector >= 0" ); V = V(:)'; # make V a row vector K = length(V); # Number of servers - isscalar(N) && N >= 0 || \ + isscalar(N) && N >= 0 || ... error( "N must be >= 0" ); - ( ismatrix(S) && rows(S) == K && columns(S) >= N ) || \ + ( ismatrix(S) && rows(S) == K && columns(S) >= N ) || ... error( "S size mismatch: is %dx%d, should be %dx%d", rows(S), columns(S), K, N ); - all(S(:)>=0) || \ + all(S(:)>=0) || ... error( "S must be >= 0" ); if ( nargin < 4 ) Z = 0; else - isscalar(Z) && Z>=0 || \ + isscalar(Z) && Z>=0 || ... error( "Z must be >= 0" ); endif
--- a/main/queueing/inst/qncspb.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncspb.m Wed Aug 28 20:24:54 2013 +0000 @@ -87,9 +87,9 @@ [err N S V m Z] = qncschkparam( varargin{:} ); isempty(err) || error(err); - ( N>0 ) || \ + ( N>0 ) || ... error("N must be positive"); - all(m==1) || \ + all(m==1) || ... error("qncspb only supports single server nodes"); D = S .* V;
--- a/main/queueing/inst/qncsvisits.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qncsvisits.m Wed Aug 28 20:24:54 2013 +0000 @@ -63,11 +63,11 @@ print_usage(); endif - issquare(P) || \ + issquare(P) || ... error("P must be a square matrix"); [res err] = dtmcchkP(P); - (res>0) || \ + (res>0) || ... error( "invalid transition probability matrix P" ); K = rows(P); @@ -75,10 +75,10 @@ if ( nargin < 2 ) r = 1; else - isscalar(r) || \ + isscalar(r) || ... error("r must be a scalar"); - (r>=1 && r<=K) || \ + (r>=1 && r<=K) || ... error("r must be an integer in the range 1 - %d",K); endif
--- a/main/queueing/inst/qnjackson.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnjackson.m Wed Aug 28 20:24:54 2013 +0000 @@ -120,27 +120,27 @@ if ( nargin < 3 || nargin > 5 ) print_usage(); endif - ( isvector(lambda) && all(lambda>=0) ) || \ + ( isvector(lambda) && all(lambda>=0) ) || ... error( "lambda must be a vector >= 0" ); lambda=lambda(:)'; # make lambda a row vector N = length(lambda); - isvector(S) || \ + isvector(S) || ... error( "S must be a vector" ); S = S(:)'; # make S a row vector - size_equal(lambda,S) || \ + size_equal(lambda,S) || ... error( "lambda and S must of be of the same length" ); - all(S>0) || \ + all(S>0) || ... error( "S must be >0" ); - [N,N] == size(P) || \ + [N,N] == size(P) || ... error(" P must be a matrix of size length(lambda) x length(lambda)" ); - all(all(P>=0)) && all(sum(P,2)<=1) || \ + all(all(P>=0)) && all(sum(P,2)<=1) || ... error( "P is not a transition probability matrix" ); if ( nargin < 4 || isempty(m) ) m = ones(1,N); else [errorcode, lambda, m] = common_size(lambda, m); - ( isvector(m) && (errorcode==0) ) || \ + ( isvector(m) && (errorcode==0) ) || ... error("m and lambda must have the same length" ); endif @@ -157,9 +157,9 @@ if ( nargin == 5 ) - ( isvector(k) && size_equal(lambda,k) ) || \ + ( isvector(k) && size_equal(lambda,k) ) || ... error( "k must be a vector of the same size as lambda" ); - all(k>=0) || \ + all(k>=0) || ... error( "k must be nonnegative" ); ## compute occupancy probability @@ -168,11 +168,11 @@ U_or_pi(i) = (1-rho(i)).*rho(i).^k(i); for i=find(m>1) # M/M/k queues k = [0:m(i)-1]; - pizero = 1 / (sum( (m(i)*rho(i)).^k ./ factorial(k)) + \ - (m(i)*rho(i))^m(i) / (factorial(m(i))*(1-rho(i))) \ + pizero = 1 / (sum( (m(i)*rho(i)).^k ./ factorial(k)) + ... + (m(i)*rho(i))^m(i) / (factorial(m(i))*(1-rho(i))) ... ); ## Compute the marginal probabilities - U_or_pi(i) = pizero * (m(i)^min(k(i),m(i))) * (rho(i)^k(i)) / \ + U_or_pi(i) = pizero * (m(i)^min(k(i),m(i))) * (rho(i)^k(i)) / ... factorial(min(m(i),k(i))); endfor i = find(m<1); # infinite server nodes
--- a/main/queueing/inst/qnmarkov.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnmarkov.m Wed Aug 28 20:24:54 2013 +0000 @@ -153,24 +153,24 @@ size_equal(m,S) || error( "m must have the same langth as S" ); endif - ( [K,K] == size(P) && all( all(P>=0)) && all(sum(P,2) <= 1)) || \ + ( [K,K] == size(P) && all( all(P>=0)) && all(sum(P,2) <= 1)) || ... error( "P must be SxS and nonnegative" ); if ( isscalar(x) ) is_open = false; N = x; # closed network - ( N < sum(C) ) || \ + ( N < sum(C) ) || ... error( "The population size exceeds the network capacity" ); - all( abs(sum(P,2)-1) < 1000*eps ) || \ + all( abs(sum(P,2)-1) < 1000*eps ) || ... error( "P for closed networks cannot have exit nodes" ); else is_open = true; lambda = x; # open network - size_equal(lambda, S ) || \ + size_equal(lambda, S ) || ... error( "lambda must have the same langth as S" ); endif - ( all(m > 0) && all(m <= C) ) || \ + ( all(m > 0) && all(m <= C) ) || ... error( "Capacities C must be greater or equal than m" ); q_size = prod( C+1 ); # number of states of the system
--- a/main/queueing/inst/qnmix.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnmix.m Wed Aug 28 20:24:54 2013 +0000 @@ -112,34 +112,34 @@ if ( nargin < 4 || nargin > 5 ) print_usage(); endif - isvector(lambda) || \ + isvector(lambda) || ... error( "lambda must be a vector" ); lambda = lambda(:)'; - isvector(N) || \ + isvector(N) || ... error( "N must be a vector" ); N = N(:)'; - size_equal(lambda,N) || \ + size_equal(lambda,N) || ... error( "lambda and N must be of equal length" ); - ( !any( lambda>0 & N>0 ) ) || \ + ( !any( lambda>0 & N>0 ) ) || ... error("A class cannot be open and closed at the same time. Check lambda and N" ); - ( all( lambda>0 | N>0 ) ) || \ + ( all( lambda>0 | N>0 ) ) || ... error( "A class cannot be neither open nor closed. Check lambda and N" ); - size_equal(S,V) || \ + size_equal(S,V) || ... error( "S and V must have the same size" ); C = length(lambda); # number of classes K = columns(S); # number of service centers - rows(S) == C || \ + rows(S) == C || ... error( "S must have %d rows", C ); if ( nargin < 5 ) m = ones(1,K); else - isvector( m ) || \ + isvector( m ) || ... error( "m must be a vector" ); m = m(:)'; - size_equal(lambda,m) || \ + size_equal(lambda,m) || ... error( "lambda and m must be of equal length" ); endif - all( m<=1 ) || \ + all( m<=1 ) || ... error( "This function supports single-server and delay centers only. Check m" ); if ( !any(lambda>0) ) warning( "qnmix(): There are no open classes. Using qncmmva()" );
--- a/main/queueing/inst/qnmknode.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnmknode.m Wed Aug 28 20:24:54 2013 +0000 @@ -97,12 +97,12 @@ function Q = qnmknode( node, S, varargin ) - ischar(node) || \ + ischar(node) || ... error( "Parameter \"node\" must be a string" ); node = tolower(node); - isvector(S) || ismatrix(S) || \ + isvector(S) || ismatrix(S) || ... error( "Parameter \"S\" must be a vector" ); m = 1; s2 = ones( size(S) ); @@ -124,21 +124,21 @@ endif elseif ( strcmp(node, "-/g/1-lcfs-pr") ) ## -/G/1-LCFS-PR node - ( 2 == nargin || 3 == nargin ) || \ + ( 2 == nargin || 3 == nargin ) || ... print_usage(); if ( 3 == nargin ) s2 = varargin{1}; endif elseif ( strcmp(node, "-/g/1-ps") ) ## -/G/1-PS (processor sharing) node - ( 2 == nargin || 3 == nargin ) || \ + ( 2 == nargin || 3 == nargin ) || ... print_usage(); if ( 3 == nargin ) s2 = varargin{1}; endif elseif ( strcmp(node, "-/g/inf") ) ## -/G/inf (Infinite Server) node - ( 2 == nargin || 3 == nargin ) || \ + ( 2 == nargin || 3 == nargin ) || ... print_usage(); if ( 3 == nargin ) s2 = varargin{1}; @@ -146,9 +146,9 @@ else error( "Unknown node type \"%s\". node type must be one of \"m/m/m-fcfs\", \"-/g/1-lcfs-pr\", \"-/g/1-ps\" and \"-/g/inf\"", node ); endif - ( isnumeric(m) && m>=1 ) || \ + ( isnumeric(m) && m>=1 ) || ... error("m must be >=1"); - ( isnumeric(s2) && s2>= 0 ) || \ + ( isnumeric(s2) && s2>= 0 ) || ... error("s2 must be >=0"); Q = struct( "node", node, "m", m, "S", S, "s2", s2, "c", rows(S), "comment", "" ); endfunction
--- a/main/queueing/inst/qnom.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnom.m Wed Aug 28 20:24:54 2013 +0000 @@ -101,7 +101,7 @@ ## processing capacity m(m<1) = -1; # avoids division by zero in next line [Umax kmax] = max(lambda * D ./ m); - (Umax < 1) || \ + (Umax < 1) || ... error( "Processing capacity exceeded at center %d", kmax ); U = R = Q = X = zeros(C,K);
--- a/main/queueing/inst/qnomaba.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnomaba.m Wed Aug 28 20:24:54 2013 +0000 @@ -81,23 +81,23 @@ if ( nargin < 2 || nargin > 3 ) print_usage(); endif - (isvector(lambda) && length(lambda)>0) || \ + (isvector(lambda) && length(lambda)>0) || ... error( "lambda must be a nonempty vector" ); - all(lambda > 0) || \ + all(lambda > 0) || ... error( "lambda must contain nonnegative values" ); lambda = lambda(:)'; C = length(lambda); - ( ismatrix(S) && rows(S)==C ) || \ + ( ismatrix(S) && rows(S)==C ) || ... error( "S/D must be a matrix >=0 with %d rows", C ); - all(S(:)>=0) || \ + all(S(:)>=0) || ... error( "S/D must contain nonnegative values" ); K = columns(S); if ( nargin < 3 ) V = ones(size(S)); else - ( ismatrix(V) && size_equal(S,V) ) || \ + ( ismatrix(V) && size_equal(S,V) ) || ... error( "V must be a %d x %d matrix", C, K); - all(V(:)>=0) || \ + all(V(:)>=0) || ... error( "V must contain nonnegative values" ); endif
--- a/main/queueing/inst/qnomvisits.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnomvisits.m Wed Aug 28 20:24:54 2013 +0000 @@ -58,17 +58,17 @@ print_usage(); endif - ndims(P) == 4 || \ + ndims(P) == 4 || ... error("P must be a 4-dimensional matrix"); [C, K, C2, K2] = size( P ); - (K == K2 && C == C2) || \ + (K == K2 && C == C2) || ... error( "P must be a [C,K,C,K] matrix"); - ismatrix(lambda) && [C,K] == size(lambda) || \ + ismatrix(lambda) && [C,K] == size(lambda) || ... error( "lambda must be a %d x %d matrix", C, K ); - all(lambda(:)>=0) || \ + all(lambda(:)>=0) || ... error(" lambda contains negative values" ); ## solve the traffic equations: V(s,j) = lambda(s,j) / lambda + sum_r
--- a/main/queueing/inst/qnos.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnos.m Wed Aug 28 20:24:54 2013 +0000 @@ -103,14 +103,14 @@ [err lambda S V m] = qnoschkparam( varargin {:} ); isempty(err) || error(err); - all(S>0) || \ + all(S>0) || ... error( "S must be positive" ); ## If there are M/M/k servers with k>=1, compute the maximum ## processing capacity m(m<1) = -1; # avoids division by zero in next line [Umax kmax] = max( lambda * S .* V ./ m ); - (Umax < 1) || \ + (Umax < 1) || ... error( "Processing capacity exceeded at center %d", kmax ); l = lambda*V; # arrival rates
--- a/main/queueing/inst/qnosaba.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnosaba.m Wed Aug 28 20:24:54 2013 +0000 @@ -85,7 +85,7 @@ [err lambda S V m] = qnoschkparam( varargin{:} ); isempty(err) || error(err); - all(m==1) || \ + all(m==1) || ... error("this function supports M/M/1 servers only"); D = S .* V;
--- a/main/queueing/inst/qnosbsb.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnosbsb.m Wed Aug 28 20:24:54 2013 +0000 @@ -83,7 +83,7 @@ [err lambda S V m] = qnoschkparam( varargin{:} ); isempty(err) || error(err); - all(m==1) || \ + all(m==1) || ... error("this function supports M/M/1 servers only"); D = S .* V;
--- a/main/queueing/inst/qnosvisits.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnosvisits.m Wed Aug 28 20:24:54 2013 +0000 @@ -57,18 +57,18 @@ print_usage(); endif - issquare(P) || \ + issquare(P) || ... error("P must be a square matrix"); K = rows(P); - all(P(:)>=0) && all( sum(P,2)<=1+1e-5 ) || \ + all(P(:)>=0) && all( sum(P,2)<=1+1e-5 ) || ... error( "invalid transition probability matrix P" ); - ( isvector(lambda) && length(lambda) == K ) || \ + ( isvector(lambda) && length(lambda) == K ) || ... error( "lambda must be a vector with %d elements", K ); - all( lambda>= 0 ) || \ + all( lambda>= 0 ) || ... error( "lambda contains negative values" ); lambda = lambda(:)';
--- a/main/queueing/inst/qnsolve.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnsolve.m Wed Aug 28 20:24:54 2013 +0000 @@ -104,7 +104,7 @@ print_usage(); endif - ischar(network_type) || \ + ischar(network_type) || ... error("First parameter must be a string"); network_type = tolower(network_type); @@ -138,26 +138,26 @@ print_usage(); endif - ( isscalar(lambda) && (lambda>0) ) || \ + ( isscalar(lambda) && (lambda>0) ) || ... error( "lambda must be a scalar > 0" ); - iscell(QQ) || \ + iscell(QQ) || ... error( "QQ must be a cell array" ); N = length(QQ); - ( isvector(V) && length(V) == N ) || \ + ( isvector(V) && length(V) == N ) || ... error( "V must be a vector of length %d", N ); V = V(:); # make V a row vector - all(V>=0) || \ + all(V>=0) || ... error( "V must be >= 0" ); ## Initialize vectors S = zeros(size(V)); m = ones(size(V)); for i=1:N - QQ{i}.c == 1 || \ + QQ{i}.c == 1 || ... error( "Multiclass networks are not supported by this function" ); S(i) = QQ{i}.S; if __is_li(QQ{i}) @@ -182,22 +182,22 @@ if ( nargin != 3 ) print_usage(); endif - isvector(lambda) && all(lambda > 0) || \ + isvector(lambda) && all(lambda > 0) || ... error( "lambda must be a vector >0" ); lambda = lambda(:)'; # make lambda a row vector - iscell(QQ) || \ + iscell(QQ) || ... error( "QQ must be a cell array" ); C = length(lambda); K = length(QQ); - [C,K] == size(V) || \ + [C,K] == size(V) || ... error( "V size mismatch" ); - all( all( V>= 0 ) ) || \ + all( all( V>= 0 ) ) || ... error( "V must be >= 0 " ); S = zeros(C,K); m = ones(1,K); for i=1:K - QQ{i}.c == C || \ + QQ{i}.c == C || ... error( "Wrong number of classes for center %d (is %d, should be %d)", i, QQ{i}.c, C ); S(:,i) = QQ{i}.S(:); if __is_li(QQ{i}) @@ -233,22 +233,22 @@ error(); endif - isscalar(N) || \ + isscalar(N) || ... error( "Multiclass networks are not supported by this function" ); - iscell(QQ) || \ + iscell(QQ) || ... error( "QQ must be a cell array" ); if ( nargin < 4 ) Z = 0; else - isscalar(Z) && Z >= 0 || \ + isscalar(Z) && Z >= 0 || ... error( "Z must be >= 0" ); endif K = length(QQ); - ( isvector(V) && length(V) == K ) || \ + ( isvector(V) && length(V) == K ) || ... error( "V must be a vector of length %d", K ); found_ld = false; @@ -262,7 +262,7 @@ if ( found_ld ) S = zeros(K, N); for k=1:K - ( QQ{k}.c == 1 ) || \ + ( QQ{k}.c == 1 ) || ... error( "Multiclass networks are not supported by this function" ); if __is_li(QQ{k}) S(k,:) = QQ{k}.S; @@ -281,7 +281,7 @@ S = zeros(1,K); m = ones(1,K); for k=1:K - ( QQ{k}.c == 1 ) || \ + ( QQ{k}.c == 1 ) || ... error( "Multiclass networks are not supported by this function" ); S(k) = QQ{k}.S; if __is_li(QQ{k}) @@ -413,45 +413,45 @@ print_usage(); endif - isvector(N) && all( N>0 ) || \ + isvector(N) && all( N>0 ) || ... error( "N must be >0" ); - iscell(QQ) || \ + iscell(QQ) || ... error( "QQ must be a cell array" ); C = length(N); ## Number of classes K = length(QQ); ## Number of service centers - size(V) == [C,K] || \ + size(V) == [C,K] || ... error( "V size mismatch" ); if ( nargin < 4 ) Z = zeros(1,C); else - isvector(Z) && length(Z) == C || \ + isvector(Z) && length(Z) == C || ... error( "Z size mismatch" ); endif ## Check consistence of parameters - all( all( V >= 0 ) ) || \ + all( all( V >= 0 ) ) || ... error( "V must be >=0" ); ## Initialize vectors i_single = i_multi = i_delay = i_ld = []; S = zeros(C,K); for i=1:K - ( QQ{i}.c == C ) || \ + ( QQ{i}.c == C ) || ... error( "Service center %d has wrong number of classes (is %d, should be %d)", i, QQ{i}.c, C ); if __is_li(QQ{i}) i_single = [i_single i]; - ( !strcmpi( QQ{i}.node, "m/m/m-fcfs" ) || all( QQ{i}.S(1) == QQ{i}.S )) || \ + ( !strcmpi( QQ{i}.node, "m/m/m-fcfs" ) || all( QQ{i}.S(1) == QQ{i}.S )) || ... error( "Service times at FIFO node %d are not class-independent", i ); elseif __is_multi(QQ{i}) i_multi = [i_multi i]; elseif __is_is(QQ{i}) i_delay = [i_delay i]; elseif __is_ld(QQ{i}) - columns( QQ{i}.S ) == sum(N) || \ + columns( QQ{i}.S ) == sum(N) || ... error( "Load-dependent center %d has insufficient data (is %d, should be %d", i, columns(QQ{i}.S), sum(N) ); i_ld = [i_ld i]; else @@ -592,9 +592,9 @@ if ( nargin != 4 ) print_usage(); endif - ( isvector(lambda) && isvector(N) && size_equal(lambda,N) ) || \ + ( isvector(lambda) && isvector(N) && size_equal(lambda,N) ) || ... error( "lambda and N must be vectors of the same size" ); - ( iscell(QQ) && length(QQ) == length(lambda) ) || \ + ( iscell(QQ) && length(QQ) == length(lambda) ) || ... error( "QQ size mismatch (is %d, should be %d)", length(QQ), length(lambda) ); C = length(lambda); # number of classes @@ -631,9 +631,9 @@ ############################################################################## ## return true iff Q is a single-server, load-dependent node function result = __is_ld( Q ) - result = ( (strcmp(Q.node, "m/m/m-fcfs") || \ - strcmp(Q.node, "-/g/1-lcfs-pr") || \ - strcmp(Q.node, "-/g/1-ps" ) ) && \ + result = ( (strcmp(Q.node, "m/m/m-fcfs") || ... + strcmp(Q.node, "-/g/1-lcfs-pr") || ... + strcmp(Q.node, "-/g/1-ps" ) ) && ... columns( Q.S ) > 1 ); endfunction @@ -652,20 +652,20 @@ if ( errorcode) error( "N and lambda are of incompatible size" ); endif - ( isvector(N) && isvector(lambda) && size_equal(lambda,N) ) || \ + ( isvector(N) && isvector(lambda) && size_equal(lambda,N) ) || ... error( "N and lambda must be vector of the same length" ); C = length(N); K = length(QQ); # number of service centers - [C,K] == size(V) || \ + [C,K] == size(V) || ... error( "V size mismatch" ); - [C,K] == size(U) || \ + [C,K] == size(U) || ... error( "U size mismatch" ); - [C,K] == size(R) || \ + [C,K] == size(R) || ... error( "R size mismatch" ); - [C,K] == size(Q) || \ + [C,K] == size(Q) || ... error( "Q size mismatch" ); - [C,K] == size(X) || \ + [C,K] == size(X) || ... error( "X size mismatch" ); for c=1:C
--- a/main/queueing/inst/qnvisits.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qnvisits.m Wed Aug 28 20:24:54 2013 +0000 @@ -86,7 +86,7 @@ print_usage(); endif - ( ndims(P) == 2 || ndims(P) == 4 ) || \ + ( ndims(P) == 2 || ndims(P) == 4 ) || ... error("P must be a 2- or 4-dimensional matrix"); if ( ndims(P) == 2 ) @@ -322,7 +322,7 @@ ## is the arrival rate of class-r customers on service center i function [V chains] = __qnvisitsmulti( P, lambda ) [C, K, C2, K2] = size( P ); - (K == K2 && C == C2) || \ + (K == K2 && C == C2) || ... error( "P must be a [C,K,C,K] matrix"); chains = []; @@ -345,7 +345,7 @@ if ( chains(c) == 0 ) chains(c) = CH(c,k); else - ( CH(c,k) == 0 || chains(c) == CH(c,k) ) || \ + ( CH(c,k) == 0 || chains(c) == CH(c,k) ) || ... error("Class %d belongs to different chains",c); endif endfor @@ -399,7 +399,7 @@ ## lambda + sum_r sum_i V(r,i) * P(r,i,s,j), for all s,j where ## lambda is defined as sum_r sum_i lambda(r,i) - [C,K] == size(lambda) || \ + [C,K] == size(lambda) || ... error( "lambda size mismatch" ); ## solve the traffic equation @@ -469,7 +469,7 @@ persistent epsilon = 10*eps; - issquare(P) || \ + issquare(P) || ... error( "P must be a square matrix" ); N = size(P,1); @@ -480,7 +480,7 @@ ## Closed network ## [res err] = dtmcchkP(P); - (res>0) || \ + (res>0) || ... error( "P is not a transition probability matrix for closed networks" ); A = P-eye(N); @@ -493,12 +493,12 @@ ## ## Open network ## - all(P(:)>=0) && all( sum(P,2)<=1+1e-5 ) || \ + all(P(:)>=0) && all( sum(P,2)<=1+1e-5 ) || ... error( "P is not a transition probability matrix for open networks" ); - ( isvector(lambda) && length(lambda) == N ) || \ + ( isvector(lambda) && length(lambda) == N ) || ... error( "lambda size mismatch" ); - all( lambda>= 0 ) || \ + all( lambda>= 0 ) || ... error( "lambda contains negative values" ); A = eye(N)-P;
--- a/main/queueing/inst/qsammm.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qsammm.m Wed Aug 28 20:24:54 2013 +0000 @@ -74,12 +74,12 @@ print_usage(); endif - ( isscalar(lambda) && isvector(mu) ) || \ + ( isscalar(lambda) && isvector(mu) ) || ... error( "the parameters must be vectors" ); m = length(mu); # number of servers - all( lambda < sum(mu) ) || \ + all( lambda < sum(mu) ) || ... error( "Processing capacity exceeded" ); X = lambda;
--- a/main/queueing/inst/qsmm1.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qsmm1.m Wed Aug 28 20:24:54 2013 +0000 @@ -85,7 +85,7 @@ if ( nargin != 2 ) print_usage(); endif - ( isvector(lambda) && isvector(mu) ) || \ + ( isvector(lambda) && isvector(mu) ) || ... error( "lambda and mu must be vectors" ); [ err lambda mu ] = common_size( lambda, mu ); if ( err ) @@ -93,9 +93,9 @@ endif lambda = lambda(:)'; mu = mu(:)'; - all( lambda > 0 ) || \ + all( lambda > 0 ) || ... error( "lambda must be >0" ); - all( mu > lambda ) || \ + all( mu > lambda ) || ... error( "The system is not ergodic" ); U = rho = lambda ./ mu; # utilization p0 = 1-rho;
--- a/main/queueing/inst/qsmm1k.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qsmm1k.m Wed Aug 28 20:24:54 2013 +0000 @@ -94,7 +94,7 @@ print_usage(); endif - ( isvector(lambda) && isvector(mu) && isvector(K) ) || \ + ( isvector(lambda) && isvector(mu) && isvector(K) ) || ... error( "lambda, mu, K must be vectors of the same size" ); [err lambda mu K] = common_size( lambda, mu, K ); @@ -102,9 +102,9 @@ error( "Parameters are not of common size" ); endif - all( K>0 ) || \ + all( K>0 ) || ... error( "K must be >0" ); - ( all( lambda>0 ) && all( mu>0 ) ) || \ + ( all( lambda>0 ) && all( mu>0 ) ) || ... error( "lambda and mu must be >0" ); U = R = Q = X = p0 = pK = 0*lambda;
--- a/main/queueing/inst/qsmminf.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qsmminf.m Wed Aug 28 20:24:54 2013 +0000 @@ -90,7 +90,7 @@ if ( nargin != 2 ) print_usage(); endif - ( isvector(lambda) && isvector(mu) ) || \ + ( isvector(lambda) && isvector(mu) ) || ... error( "lambda and mu must be vectors" ); [ err lambda mu ] = common_size( lambda, mu ); if ( err ) @@ -98,7 +98,7 @@ endif lambda = lambda(:)'; mu = mu(:)'; - ( all( lambda>0 ) && all( mu>0 ) ) || \ + ( all( lambda>0 ) && all( mu>0 ) ) || ... error( "lambda and mu must be >0" ); U = Q = lambda ./ mu; # Traffic intensity. p0 = exp(-lambda./mu); # probability that there are 0 requests in the system
--- a/main/queueing/inst/qsmmm.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qsmmm.m Wed Aug 28 20:24:54 2013 +0000 @@ -107,7 +107,7 @@ if ( nargin == 2 ) m = 1; endif - ( isvector(lambda) && isvector(mu) && isvector(m) ) || \ + ( isvector(lambda) && isvector(mu) && isvector(m) ) || ... error( "the parameters must be vectors" ); [err lambda mu m] = common_size( lambda, mu, m ); if ( err ) @@ -115,9 +115,9 @@ endif lambda = lambda(:)'; mu = mu(:)'; - all( m>0 ) || \ + all( m>0 ) || ... error( "m must be >0" ); - all( lambda < m .* mu ) || \ + all( lambda < m .* mu ) || ... error( "Processing capacity exceeded" ); X = lambda; U = rho = lambda ./ (m .* mu );
--- a/main/queueing/inst/qsmmmk.m Wed Aug 28 17:34:48 2013 +0000 +++ b/main/queueing/inst/qsmmmk.m Wed Aug 28 20:24:54 2013 +0000 @@ -129,11 +129,11 @@ error( "Parameters are not of common size" ); endif - all( K>0 ) || \ + all( K>0 ) || ... error( "k must be strictly positive" ); - all( m>0 ) && all( m <= K ) || \ + all( m>0 ) && all( m <= K ) || ... error( "m must be in the range 1:k" ); - all( lambda>0 ) && all( mu>0 ) || \ + all( lambda>0 ) && all( mu>0 ) || ... error( "lambda and mu must be >0" ); U = R = Q = X = p0 = pK = 0*lambda; for i=1:length(lambda)