comparison scripts/sparse/spaugment.m @ 14327:4d917a6a858b stable

doc: Use Octave coding conventions in @example blocks of docstrings. * accumarray.m, accumdim.m, bar.m, base2dec.m, bincoeff.m, bitcmp.m, bitset.m, celldisp.m, chop.m, clabel.m, cloglog.m, colon.m, compass.m, computer.m, contour3.m, contourc.m, corr.m, cstrcat.m, ctime.m, cylinder.m, date.m, dec2base.m, demo.m, dir.m, dlmwrite.m, expm.m, ezcontourf.m, ezcontour.m, ezmeshc.m, ezmesh.m, ezplot.m, ezsurfc.m, ezsurf.m, feather.m, findobj.m, flipdim.m, fplot.m, genvarname.m, getfield.m, hankel.m, hilb.m, hist.m, idivide.m, index.m, int2str.m, interp1.m, is_leap_year.m, ismember.m, isocolors.m, isonormals.m, isosurface.m, kurtosis.m, legendre.m, linkprop.m, logit.m, logm.m, __makeinfo__.m, __marching_cube__.m, median.m, mkoctfile.m, moment.m, mpoles.m, orderfields.m, pcg.m, pcr.m, plot3.m, plotmatrix.m, polyaffine.m, polygcd.m, poly.m, polyout.m, print.m, qp.m, quadgk.m, qzhess.m, randi.m, rat.m, refreshdata.m, residue.m, rose.m, rot90.m, saveas.m, saveobj.m, shiftdim.m, skewness.m, spaugment.m, spdiags.m, sqp.m, stem.m, str2num.m, strcat.m, strjust.m, strread.m, strsplit.m, structfun.m, subplot.m, subsindex.m, substruct.m, surfl.m, surfnorm.m, svds.m, uimenu.m, union.m, voronoi.m, warning_ids.m, wblpdf.m: Use Octave coding conventions in @example blocks of docstrings.
author Rik <octave@nomad.inbox5.com>
date Sat, 04 Feb 2012 22:12:50 -0800
parents 72c96de7a403
children f3d52523cde1
comparison
equal deleted inserted replaced
14325:a646cee995cf 14327:4d917a6a858b
20 ## @deftypefn {Function File} {@var{s} =} spaugment (@var{A}, @var{c}) 20 ## @deftypefn {Function File} {@var{s} =} spaugment (@var{A}, @var{c})
21 ## Create the augmented matrix of @var{A}. This is given by 21 ## Create the augmented matrix of @var{A}. This is given by
22 ## 22 ##
23 ## @example 23 ## @example
24 ## @group 24 ## @group
25 ## [@var{c} * eye(@var{m}, @var{m}),@var{A}; @var{A}', zeros(@var{n}, 25 ## [@var{c} * eye(@var{m}, @var{m}), @var{A};
26 ## @var{n})] 26 ## @var{A}', zeros(@var{n}, @var{n})]
27 ## @end group 27 ## @end group
28 ## @end example 28 ## @end example
29 ## 29 ##
30 ## @noindent 30 ## @noindent
31 ## This is related to the least squares solution of 31 ## This is related to the least squares solution of
32 ## @code{@var{A} \\ @var{b}}, by 32 ## @code{@var{A} \ @var{b}}, by
33 ## 33 ##
34 ## @example 34 ## @example
35 ## @group 35 ## @group
36 ## @var{s} * [ @var{r} / @var{c}; x] = [@var{b}, zeros(@var{n}, 36 ## @var{s} * [ @var{r} / @var{c}; x] = [ @var{b}, zeros(@var{n}, columns(@var{b})) ]
37 ## columns(@var{b})]
38 ## @end group 37 ## @end group
39 ## @end example 38 ## @end example
40 ## 39 ##
41 ## @noindent 40 ## @noindent
42 ## where @var{r} is the residual error 41 ## where @var{r} is the residual error
51 ## error will be @code{zeros (@var{m}, @var{m})} for under determined 50 ## error will be @code{zeros (@var{m}, @var{m})} for under determined
52 ## problems, and example can be 51 ## problems, and example can be
53 ## 52 ##
54 ## @example 53 ## @example
55 ## @group 54 ## @group
56 ## m = 11; n = 10; mn = max(m ,n); 55 ## m = 11; n = 10; mn = max (m, n);
57 ## A = spdiags ([ones(mn,1), 10*ones(mn,1), -ones(mn,1)], 56 ## A = spdiags ([ones(mn,1), 10*ones(mn,1), -ones(mn,1)],
58 ## [-1, 0, 1], m, n); 57 ## [-1, 0, 1], m, n);
59 ## x0 = A \ ones (m,1); 58 ## x0 = A \ ones (m,1);
60 ## s = spaugment (A); 59 ## s = spaugment (A);
61 ## [L, U, P, Q] = lu (s); 60 ## [L, U, P, Q] = lu (s);