Mercurial > hg > octave-lyh
changeset 14991:6bc39019f726
maint: periodic merge of default to jit
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Fri, 13 Jul 2012 12:31:51 -0400 |
parents | 149d1e2224f0 (current diff) e027f98403c3 (diff) |
children | fd8d1a616be1 |
files | |
diffstat | 87 files changed, 760 insertions(+), 559 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/faq/OctaveFAQ.texi +++ b/doc/faq/OctaveFAQ.texi @@ -454,7 +454,7 @@ @group octave:1> [3 1 4 1 5 9](3) ans = 4 -octave:2> cos([0 pi pi/4 7])(3) +octave:2> cos ([0 pi pi/4 7])(3) ans = 0.70711 @end group @end example @@ -871,7 +871,7 @@ @example @group function y = foo (x) - y = bar(x) + y = bar (x) function y = bar (x) y = @dots{}; end @@ -884,7 +884,7 @@ @example @group function y = foo (x) - y = bar(x) + y = bar (x) end function y = bar (x) y = @dots{}; @@ -1065,7 +1065,7 @@ @example @group - do_braindead_shortcircuit_evaluation(1) + do_braindead_shortcircuit_evaluation (1) @end group @end example @@ -1102,7 +1102,7 @@ logically true). Finally, note the inconsistence of thinking of the condition of an if -statement as being equivalent to @code{all(X(:))} when @var{X} is a +statement as being equivalent to @code{all (X(:))} when @var{X} is a matrix. This is true for all cases EXCEPT empty matrices: @example @@ -1147,7 +1147,7 @@ @example @group function x = mldivide (A, b) - [Q, R, E] = qr(A); + [Q, R, E] = qr (A); x = [A \ b, E(:, 1:m) * (R(:, 1:m) \ (Q' * b))] end @end group @@ -1161,14 +1161,14 @@ A numerical question arises: how big can the null space component become, relative to the minimum-norm solution? Can it be nicely bounded, or can it be arbitrarily big? Consider this example: - +OctaveFAQ.texi @example @group m = 10; n = 10000; -A = ones(m, n) + 1e-6 * randn(m,n); -b = ones(m, 1) + 1e-6 * randn(m,1); -norm(A \ b) +A = ones (m, n) + 1e-6 * randn (m,n); +b = ones (m, 1) + 1e-6 * randn (m,1); +norm (A \ b) @end group @end example @@ -1180,14 +1180,14 @@ @group m = 5; n = 100; -j = floor(m * rand(1, n)) + 1; -b = ones(m, 1); -A = zeros(m, n); -A(sub2ind(size(A),j,1:n)) = 1; +j = floor (m * rand (1, n)) + 1; +b = ones (m, 1); +A = zeros (m, n); +A(sub2ind (size (A),j,1:n)) = 1; x = A \ b; -[dummy,p] = sort(rand(1,n)); -y = A(:,p)\b; -norm(x(p)-y) +[dummy,p] = sort (rand (1,n)); +y = A(:,p) \ b; +norm (x(p)-y) @end group @end example @@ -1282,10 +1282,10 @@ gives no safe way of temporarily changing global variables. @item -Indexing can be applied to all objects in Octave and not just +Indexing can be applied to all objects in Octave and not just a variable. Therefore @code{sin(x)(1:10);} for example is perfectly valid in Octave but not @sc{Matlab}. To do the same in @sc{Matlab} you must do -@code{y = sin(x); y = y([1:10]);} +@code{y = sin (x); y = y([1:10]);} @item Octave has the operators "++", "--", "-=", "+=", "*=", etc. As
--- a/doc/interpreter/basics.txi +++ b/doc/interpreter/basics.txi @@ -1023,10 +1023,10 @@ @group function countdown # Count down for main rocket engines - disp(3); - disp(2); - disp(1); - disp("Blast Off!"); # Rocket leaves pad + disp (3); + disp (2); + disp (1); + disp ("Blast Off!"); # Rocket leaves pad endfunction @end group @end example @@ -1046,19 +1046,19 @@ @group function quick_countdown # Count down for main rocket engines - disp(3); + disp (3); #@{ - disp(2); - disp(1); + disp (2); + disp (1); #@} - disp("Blast Off!"); # Rocket leaves pad + disp ("Blast Off!"); # Rocket leaves pad endfunction @end group @end example @noindent will produce a very quick countdown from '3' to 'Blast Off' as the -lines "@code{disp(2);}" and "@code{disp(1);}" won't be executed. +lines "@code{disp (2);}" and "@code{disp (1);}" won't be executed. The block comment markers must appear alone as the only characters on a line (excepting whitespace) in order to be parsed correctly.
--- a/doc/interpreter/container.txi +++ b/doc/interpreter/container.txi @@ -308,7 +308,7 @@ @example @group -[x.a] = deal("new string1", "new string2"); +[x.a] = deal ("new string1", "new string2"); x(1).a @result{} ans = new string1 x(2).a @@ -322,7 +322,7 @@ @example @group x(3:4) = x(1:2); -[x([1,3]).a] = deal("other string1", "other string2"); +[x([1,3]).a] = deal ("other string1", "other string2"); x.a @result{} ans = other string1 @@ -337,7 +337,7 @@ @example @group -size(x) +size (x) @result{} ans = 1 4 @@ -605,10 +605,10 @@ @example @group -iscell(c) +iscell (c) @result{} ans = 1 -iscell(3) +iscell (3) @result{} ans = 0 @end group @@ -631,7 +631,7 @@ @example @group -c = cell(2,2) +c = cell (2,2) @result{} c = @{ @@ -652,9 +652,9 @@ @example @group -c1 = cell(3, 4, 5); -c2 = cell( [3, 4, 5] ); -size(c1) +c1 = cell (3, 4, 5); +c2 = cell ( [3, 4, 5] ); +size (c1) @result{} ans = 3 4 5 @end group @@ -766,7 +766,7 @@ @example @group -[c@{[1,2], :@}] = deal(c@{[2, 1], :@}) +[c@{[1,2], :@}] = deal (c@{[2, 1], :@}) @result{} = @{ [1,1] = 1
--- a/doc/interpreter/contrib.txi +++ b/doc/interpreter/contrib.txi @@ -66,28 +66,35 @@ @itemize @bullet @item Check out a copy of the Octave sources: + @example hg clone http://hg.savannah.gnu.org/hgweb/octave @end example @item Change to the top-level directory of the newly checked out sources: + @example cd octave @end example @item Generate the necessary configuration files: + @example ./autogen.sh @end example @item Create a build directory and change to it: + @example +@group mkdir build cd build +@end group @end example + By using a separate build directory, you will keep the source directory clean and it will be easy to completely remove all files generated by the build. You can also have parallel build trees for different @@ -98,15 +105,18 @@ @item Run Octave's configure script from the build directory: + @example ../configure @end example @item Run make in the build directory: + @example make @end example + @end itemize Once the build is finished, you will see a message like the following: @@ -321,7 +331,7 @@ @example @group if (isvector (a)) - s = sum(a); + s = sum (a); endif @end group @end example
--- a/doc/interpreter/diagperm.txi +++ b/doc/interpreter/diagperm.txi @@ -93,7 +93,7 @@ 0 0 3 0 0 0 0 4 - diag(1:3,5,3) + diag (1:3,5,3) @result{} Diagonal Matrix @@ -511,6 +511,7 @@ This behavior not only facilitates the most straightforward and efficient implementation of algorithms, but also preserves certain useful invariants, like: + @itemize @item scalar * diagonal matrix is a diagonal matrix @@ -553,13 +554,13 @@ @example @group -diag(1:3) * [NaN; 1; 1] +diag (1:3) * [NaN; 1; 1] @result{} NaN 2 3 -sparse(1:3,1:3,1:3) * [NaN; 1; 1] +sparse (1:3,1:3,1:3) * [NaN; 1; 1] @result{} NaN 2
--- a/doc/interpreter/diffeq.txi +++ b/doc/interpreter/diffeq.txi @@ -100,8 +100,8 @@ @example @group -t = [0, logspace (-1, log10(303), 150), \ - logspace (log10(304), log10(500), 150)]; +t = [0, logspace(-1, log10(303), 150), \ + logspace(log10(304), log10(500), 150)]; @end group @end example
--- a/doc/interpreter/doccheck/aspell-octave.en.pws +++ b/doc/interpreter/doccheck/aspell-octave.en.pws @@ -140,6 +140,7 @@ collectoutput colorbar colormap +colormaps ColorOrder colperm Comint @@ -339,6 +340,7 @@ gesvd gfortan Ghostscript +Ghostscript's gif GIF glibc @@ -359,6 +361,7 @@ gplot grabdemo GradObj +GraphicsAlphaBits GraphicsMagick Graymap grayscale @@ -864,6 +867,7 @@ strncmp strncmpi strread +strread's struct structs subarrays @@ -920,6 +924,7 @@ tex texinfo Texinfo +TextAlphaBits textscan th ths @@ -986,6 +991,7 @@ unnormalized unpadded unpivoted +unregister unshare unsymmetric untabified
--- a/doc/interpreter/dynamic.txi +++ b/doc/interpreter/dynamic.txi @@ -551,7 +551,7 @@ should use @code{numel} rather than @code{nelem}. Note that for very large matrices, where the product of the two dimensions is larger than the representation of an unsigned int, then @code{numel} can overflow. -An example is @code{speye(1e6)} which will create a matrix with a million +An example is @code{speye (1e6)} which will create a matrix with a million rows and columns, but only a million non-zero elements. Therefore the number of rows by the number of columns in this case is more than two hundred times the maximum value that can be represented by an unsigned int. @@ -901,9 +901,9 @@ @group funcdemo (@@sin,1) @result{} 0.84147 -funcdemo (@@(x) sin(x), 1) +funcdemo (@@(x) sin (x), 1) @result{} 0.84147 -funcdemo (inline ("sin(x)"), 1) +funcdemo (inline ("sin (x)"), 1) @result{} 0.84147 funcdemo ("sin",1) @result{} 0.84147 @@ -1008,7 +1008,7 @@ @result{} b = 1.00000 0.50000 0.33333 s = There are 3 values in the input vector -[b, s] = fortdemo(0:3) +[b, s] = fortdemo (0:3) error: fortsub:divide by zero error: exception encountered in Fortran subroutine fortsub_ error: fortdemo: error in Fortran @@ -1086,7 +1086,7 @@ for (octave_idx_type i = 0; i < a.nelem (); i++) @{ OCTAVE_QUIT; - b.elem(i) = 2. * a.elem(i); + b.elem (i) = 2. * a.elem (i); @} @end group @end example @@ -1195,9 +1195,9 @@ @group /* -%!error (sin()) -%!error (sin(1,1)) -%!assert (sin([1,2]),[sin(1),sin(2)]) +%!error (sin ()) +%!error (sin (1,1)) +%!assert (sin ([1,2]),[sin(1),sin(2)]) */ @end group @@ -1371,7 +1371,7 @@ mwSize *dims; UINT32_T *pr; -dims = (mwSize *) mxMalloc (2 * sizeof(mwSize)); +dims = (mwSize *) mxMalloc (2 * sizeof (mwSize)); dims[0] = 2; dims[1] = 2; m = mxCreateNumericArray (2, dims, mxUINT32_CLASS, mxREAL); @@ -1403,8 +1403,8 @@ @example @group -b = randn(4,1) + 1i * randn(4,1); -all(b.^2 == mypow2(b)) +b = randn (4,1) + 1i * randn (4,1); +all (b.^2 == mypow2 (b)) @result{} 1 @end group @end example @@ -1434,7 +1434,7 @@ @example @group -mystring(["First String"; "Second String"]) +mystring (["First String"; "Second String"]) @result{} s1 = Second String First String @end group @@ -1549,7 +1549,7 @@ @example a(1).f1 = "f11"; a(1).f2 = "f12"; a(2).f1 = "f21"; a(2).f2 = "f22"; -b = mystruct(a) +b = mystruct (a) @result{} field f1(0) = f11 field f1(1) = f21 field f2(0) = f12 @@ -1651,8 +1651,8 @@ @example @group -myfeval("sin", 1) -a = myfeval("sin", 1) +myfeval ("sin", 1) +a = myfeval ("sin", 1) @result{} Hello, World! I have 2 inputs and 1 outputs I'm going to call the interpreter function sin
--- a/doc/interpreter/emacs.txi +++ b/doc/interpreter/emacs.txi @@ -329,6 +329,7 @@ @end table If Font Lock mode is enabled, Octave mode will display + @itemize @bullet @item strings in @code{font-lock-string-face} @@ -436,6 +437,7 @@ The effect of the commands which send code to the Octave process can be customized by the following variables. + @table @code @item octave-send-echo-input Non-@code{nil} means echo input sent to the inferior Octave process.
--- a/doc/interpreter/errors.txi +++ b/doc/interpreter/errors.txi @@ -63,7 +63,7 @@ @group function f (arg1) if (nargin == 0) - error("not enough input arguments"); + error ("not enough input arguments"); endif endfunction @end group
--- a/doc/interpreter/eval.txi +++ b/doc/interpreter/eval.txi @@ -127,8 +127,8 @@ @group function save (file, name1, name2) f = open_save_file (file); - save_var(f, name1, evalin ("caller", name1)); - save_var(f, name2, evalin ("caller", name2)); + save_var (f, name1, evalin ("caller", name1)); + save_var (f, name2, evalin ("caller", name2)); endfunction @end group @end example
--- a/doc/interpreter/expr.txi +++ b/doc/interpreter/expr.txi @@ -258,7 +258,7 @@ $a_i = \sqrt{i}$. @end tex @ifnottex -a(i) = sqrt(i). +a(i) = sqrt (i). @end ifnottex @example @@ -772,8 +772,8 @@ @example @group - abs(@var{z1}) < abs(@var{z2}) - || (abs(@var{z1}) == abs(@var{z2}) && arg(@var{z1}) < arg(@var{z2})) + abs (@var{z1}) < abs (@var{z2}) + || (abs (@var{z1}) == abs (@var{z2}) && arg (@var{z1}) < arg (@var{z2})) @end group @end example
--- a/doc/interpreter/func.txi +++ b/doc/interpreter/func.txi @@ -44,27 +44,35 @@ * Organization of Functions:: @end menu -@node Introduction to Function and Script Files -@section Introduction to Function and Script Files +@node Introduction to Function and Script Files +@section Introduction to Function and Script Files -There are six different things covered in this section. +There are seven different things covered in this section. @enumerate @item Typing in a function at the command prompt. + @item -Storing a group of commands in a file - called a script file. +Storing a group of commands in a file --- called a script file. + @item -Storing a function in a file - called a function file. +Storing a function in a file---called a function file. + @item -Sub-functions in function files. +Subfunctions in function files. + @item Multiple functions in one script file. + @item Private functions. + +@item +Nested functions. @end enumerate Both function files and script files end with an extension of .m, for -@sc{Matlab} compatibility. If you want more than one independent +@sc{matlab} compatibility. If you want more than one independent functions in a file, it must be a script file (@pxref{Script Files}), and to use these functions you must execute the script file before you can use the functions that are in the script file. @@ -743,6 +751,7 @@ * Manipulating the Load Path:: * Subfunctions:: * Private Functions:: +* Nested Functions:: * Overloading and Autoloading:: * Function Locking:: * Function Precedence:: @@ -763,7 +772,7 @@ code adds @samp{~/Octave} to the load path. @example -addpath("~/Octave") +addpath ("~/Octave") @end example @noindent @@ -851,6 +860,157 @@ then @code{func2} is only available for use of the functions, like @code{func1}, that are found in @code{<directory>}. +@node Nested Functions +@subsection Nested Functions + +Nested functions are similar to subfunctions in that only the main function is +visible outside the file. However, they also allow for child functions to +access the local variables in their parent function. This shared access mimics +using a global variable to share information --- but a global variable which is +not visible to the rest of Octave. As a programming strategy, sharing data +this way can create code which is difficult to maintain. It is recommended to +use subfunctions in place of nested functions when possible. + +As a simple example, consider a parent function @code{foo}, that calls a nested +child function @code{bar}, with a shared variable @var{x}. + +@example +@group +function y = foo () + x = 10; + bar (); + y = x; + + function bar () + x = 20; + endfunction +endfunction + +foo () + @result{} 20 +@end group +@end example + +@noindent +Notice that there is no special syntax for sharing @var{x}. This can lead to +problems with accidental variable sharing between a parent function and its +child. While normally variables are inherited, child function parameters and +return values are local to the child function. + +Now consider the function @code{foobar} that uses variables @var{x} and +@var{y}. @code{foobar} calls a nested function @code{foo} which takes +@var{x} as a parameter and returns @var{y}. @code{foo} then calls @code{bat} +which does some computation. + +@example +@group +function z = foobar () + x = 0; + y = 0; + z = foo (5); + z += x + y; + + function y = foo (x) + y = x + bat (); + + function z = bat () + z = x; + endfunction + endfunction +endfunction + +foobar () + @result{} 10 +@end group +@end example + +@noindent +It is important to note that the @var{x} and @var{y} in @code{foobar} remain +zero, as in @code{foo} they are a return value and parameter respectively. The +@var{x} in @code{bat} refers to the @var{x} in @code{foo}. + +Variable inheritance leads to a problem for @code{eval} and scripts. If a +new variable is created in a parent function, it is not clear what should happen +in nested child functions. For example, consider a parent function @code{foo} +with a nested child function @code{bar}: + +@example +@group +function y = foo (to_eval) + bar (); + eval (to_eval); + + function bar () + eval ("x = 100;"); + eval ("y = x;"); + endfunction +endfunction + +foo ("x = 5;") + @result{} error: can not add variable "x" to a static workspace + +foo ("y = 10;") + @result{} 10 + +foo ("") + @result{} 100 +@end group +@end example + +@noindent +The parent function @code{foo} is unable to create a new variable +@var{x}, but the child function @code{bar} was successful. Furthermore, even +in an @code{eval} statement @var{y} in @code{bar} is the same @var{y} as in its +parent function @code{foo}. The use of @code{eval} in conjunction with nested +functions is best avoided. + +As with subfunctions, only the first nested function in a file may be called +from the outside. Inside a function the rules are more complicated. In +general a nested function may call: + +@enumerate 0 +@item +Globally visible functions + +@item +Any function that the nested function's parent can call + +@item +Sibling functions (functions that have the same parents) + +@item +Direct children + +@end enumerate + +As a complex example consider a parent function @code{ex_top} with two +child functions, @code{ex_a} and @code{ex_b}. In addition, @code{ex_a} has two +more child functions, @code{ex_aa} and @code{ex_ab}. For example: + +@example +function ex_top () + ## Can call: ex_top, ex_a, and ex_b + ## Can NOT call: ex_aa and ex_ab + + function ex_a () + ## Call call everything + + function ex_aa () + ## Can call everything + endfunction + + function ex_ab () + ## Can call everything + endfunction + endfunction + + function ex_b () + ## Can call: ex_top, ex_a, and ex_b + ## Can NOT call: ex_aa and ex_ab + endfunction +endfunction +@end example + @node Overloading and Autoloading @subsection Overloading and Autoloading @@ -1240,7 +1400,7 @@ function @math{f(x) = x^2 + 2}. @example -f = inline("x^2 + 2"); +f = inline ("x^2 + 2"); @end example @noindent @@ -1270,7 +1430,7 @@ is equivalent to @example -my_command("hello", "world") +my_command ("hello", "world") @end example @noindent
--- a/doc/interpreter/geometry.txi +++ b/doc/interpreter/geometry.txi @@ -72,7 +72,7 @@ X = [ x(T(:,1)); x(T(:,2)); x(T(:,3)); x(T(:,1)) ]; Y = [ y(T(:,1)); y(T(:,2)); y(T(:,3)); y(T(:,1)) ]; axis ([0, 1, 0, 1]); -plot(X, Y, "b", x, y, "r*"); +plot (X, Y, "b", x, y, "r*"); @end group @end example @@ -172,7 +172,7 @@ @example @group @var{p} - @var{t}(end, :) = @var{beta}(1:end-1) * (@var{t}(1:end-1, :) - - ones(@var{N}, 1) * @var{t}(end, :) + - ones (@var{N}, 1) * @var{t}(end, :) @end group @end example @@ -182,8 +182,8 @@ @example @group @var{beta}(1:end-1) = (@var{p} - @var{t}(end, :)) / (@var{t}(1:end-1, :) - - ones(@var{N}, 1) * @var{t}(end, :)) -@var{beta}(end) = sum(@var{beta}(1:end-1)) + - ones (@var{N}, 1) * @var{t}(end, :)) +@var{beta}(end) = sum (@var{beta}(1:end-1)) @end group @end example @@ -298,9 +298,9 @@ @example @group -rand("state",9); -x = rand(10,1); -y = rand(10,1); +rand ("state",9); +x = rand (10,1); +y = rand (10,1); tri = delaunay (x, y); [vx, vy] = voronoi (x, y, tri); triplot (tri, x, y, "b"); @@ -336,7 +336,7 @@ x = rand (10, 1); y = rand (10, 1); [c, f] = voronoin ([x, y]); -af = zeros (size(f)); +af = zeros (size (f)); for i = 1 : length (f) af(i) = polyarea (c (f @{i, :@}, 1), c (f @{i, :@}, 2)); endfor @@ -361,7 +361,7 @@ vx = cos (pi * [-1 : 0.1: 1]); vy = sin (pi * [-1 : 0.1 : 1]); in = inpolygon (x, y, vx, vy); -plot(vx, vy, x(in), y(in), "r+", x(!in), y(!in), "bo"); +plot (vx, vy, x(in), y(in), "r+", x(!in), y(!in), "bo"); axis ([-2, 2, -2, 2]); @end group @end example @@ -434,12 +434,12 @@ @example @group -rand("state",1); -x=2*rand(1000,1)-1; -y=2*rand(size(x))-1; -z=sin(2*(x.^2+y.^2)); -[xx,yy]=meshgrid(linspace(-1,1,32)); -griddata(x,y,z,xx,yy); +rand ("state", 1); +x = 2*rand (1000,1) - 1; +y = 2*rand (size (x)) - 1; +z = sin (2*(x.^2+y.^2)); +[xx,yy] = meshgrid (linspace (-1,1,32)); +griddata (x,y,z,xx,yy); @end group @end example
--- a/doc/interpreter/install.txi +++ b/doc/interpreter/install.txi @@ -74,7 +74,7 @@ @subsection Obtaining the Dependencies Automatically On some systems you can obtain many of Octave's build dependencies -automatically. The commands for doing this vary by system. Similarly, +automatically. The commands for doing this vary by system. Similarly, the names of pre-compiled packages vary by system and do not always match exactly the names listed in @ref{Build Tools} and @ref{External Packages}. @@ -182,8 +182,10 @@ (@url{http://www.netlib.org/blas}). Accelerated BLAS libraries such as ATLAS (@url{http://math-atlas.sourceforge.net}) are recommeded for better performance. + @item LAPACK Linear Algebra Package (@url{http://www.netlib.org/lapack}). + @item PCRE The Perl Compatible Regular Expression library (http://www.pcre.org). @end table @@ -249,7 +251,7 @@ @code{load} and @code{save} commands to read and write HDF data files. @item OpenGL -API for portable 2D and 3D graphics (@url{http://www.opengl.org}). An +API for portable 2-D and 3-D graphics (@url{http://www.opengl.org}). An OpenGL implementation is required to provide Octave's OpenGL-based graphics functions. Octave's OpenGL-based graphics functions usually outperform the gnuplot-based graphics functions because plot data can be @@ -277,7 +279,7 @@ @item zlib Data compression library (@url{http://zlib.net}). The zlib library is required for Octave's @code{load} and @code{save} commands to handle -compressed data, including @sc{Matlab} v5 MAT files. +compressed data, including @sc{matlab} v5 MAT files. @end table @node Running Configure and Make
--- a/doc/interpreter/interp.txi +++ b/doc/interpreter/interp.txi @@ -50,17 +50,17 @@ dt = 1; ti =-2:0.025:2; dti = 0.025; -y = sign(t); -ys = interp1(t,y,ti,'spline'); -yp = interp1(t,y,ti,'pchip'); -ddys = diff(diff(ys)./dti)./dti; -ddyp = diff(diff(yp)./dti)./dti; -figure(1); -plot (ti, ys,'r-', ti, yp,'g-'); -legend('spline','pchip',4); -figure(2); -plot (ti, ddys,'r+', ti, ddyp,'g*'); -legend('spline','pchip'); +y = sign (t); +ys = interp1 (t,y,ti,'spline'); +yp = interp1 (t,y,ti,'pchip'); +ddys = diff (diff (ys)./dti) ./ dti; +ddyp = diff (diff (yp)./dti) ./ dti; +figure (1); +plot (ti,ys,'r-', ti,yp,'g-'); +legend ('spline', 'pchip', 4); +figure (2); +plot (ti,ddys,'r+', ti,ddyp,'g*'); +legend ('spline', 'pchip'); @end group @end example @@ -107,9 +107,9 @@ ti = t(1) + [0 : k-1]*dt*n/k; y = sin (4*t + 0.3) .* cos (3*t - 0.1); yp = sin (4*ti + 0.3) .* cos (3*ti - 0.1); -plot (ti, yp, 'g', ti, interp1(t, y, ti, 'spline'), 'b', ... +plot (ti, yp, 'g', ti, interp1 (t, y, ti, 'spline'), 'b', ... ti, interpft (y, k), 'c', t, y, 'r+'); -legend ('sin(4t+0.3)cos(3t-0.1','spline','interpft','data'); +legend ('sin(4t+0.3)cos(3t-0.1', 'spline', 'interpft', 'data'); @end group @end example @@ -164,9 +164,9 @@ v = f (xx,yy,zz); xi = yi = zi = -1:0.1:1; [xxi, yyi, zzi] = meshgrid (xi, yi, zi); -vi = interp3(x, y, z, v, xxi, yyi, zzi, 'spline'); +vi = interp3 (x, y, z, v, xxi, yyi, zzi, 'spline'); [xxi, yyi, zzi] = ndgrid (xi, yi, zi); -vi2 = interpn(x, y, z, v, xxi, yyi, zzi, 'spline'); +vi2 = interpn (x, y, z, v, xxi, yyi, zzi, 'spline'); mesh (zi, yi, squeeze (vi2(1,:,:))); @end group @end example
--- a/doc/interpreter/intro.txi +++ b/doc/interpreter/intro.txi @@ -104,7 +104,7 @@ tolerance of the calculation. @example -octave:1> exp(i*pi) +octave:1> exp (i*pi) @end example @subsection Creating a Matrix
--- a/doc/interpreter/numbers.txi +++ b/doc/interpreter/numbers.txi @@ -570,7 +570,7 @@ When doing integer division Octave will round the result to the nearest integer. This is different from most programming languages, where the result is often floored to the nearest integer. So, the result of -@code{int32(5) ./ int32(8)} is @code{1}. +@code{int32 (5) ./ int32 (8)} is @code{1}. @DOCSTRING(idivide)
--- a/doc/interpreter/oop.txi +++ b/doc/interpreter/oop.txi @@ -184,7 +184,7 @@ @noindent Note that in the display method, it makes sense to start the method -with the line @code{fprintf("%s =", inputname(1))} to be consistent +with the line @code{fprintf ("%s =", inputname (1))} to be consistent with the rest of Octave and print the variable name to be displayed when displaying the class. @@ -317,7 +317,7 @@ @example @group -p = polynomial([1,2,3,4]); +p = polynomial ([1,2,3,4]); p(end-1) @result{} 3 @end group @@ -354,7 +354,7 @@ @group function x = subsasgn (x, ss, val) @dots{} - x.myfield(ss.subs@{1@}) = val; + x.myfield (ss.subs@{1@}) = val; endfunction @end group @end example @@ -726,15 +726,15 @@ @example @group -octave:1> f=FIRfilter(polynomial([1 1 1]/3)) +octave:1> f = FIRfilter (polynomial ([1 1 1]/3)) f.polynomial = 0.333333 + 0.333333 * X + 0.333333 * X ^ 2 -octave:2> class(f) +octave:2> class (f) ans = FIRfilter -octave:3> isa(f,"FIRfilter") +octave:3> isa (f,"FIRfilter") ans = 1 -octave:4> isa(f,"polynomial") +octave:4> isa (f,"polynomial") ans = 1 -octave:5> struct(f) +octave:5> struct (f) ans = @{ polynomial = 0.333333 + 0.333333 * X + 0.333333 * X ^ 2 @@ -759,9 +759,9 @@ @example @group -octave:2> f=FIRfilter(polynomial([1 1 1]/3)); -octave:3> x=ones(5,1); -octave:4> y=f(x) +octave:2> f = FIRfilter (polynomial ([1 1 1]/3)); +octave:3> x = ones (5,1); +octave:4> y = f(x) y = 0.33333 @@ -776,7 +776,7 @@ @example @group -octave:1> f=FIRfilter(polynomial([1 1 1]/3)); +octave:1> f = FIRfilter (polynomial ([1 1 1]/3)); octave:2> f.polynomial ans = 0.333333 + 0.333333 * X + 0.333333 * X ^ 2 @end group @@ -796,13 +796,12 @@ @example @group -octave:6> f=FIRfilter (); -octave:7> f.polynomial = polynomial([1 2 3]); +octave:6> f = FIRfilter (); +octave:7> f.polynomial = polynomial ([1 2 3]); f.polynomial = 1 + 2 * X + 3 * X ^ 2 @end group @end example - Defining the FIRfilter class as a child of the polynomial class implies that and FIRfilter object may be used any place that a polynomial may be used. This is not a normal use of a filter, so that
--- a/doc/interpreter/package.txi +++ b/doc/interpreter/package.txi @@ -1,4 +1,4 @@ -@c Copyright (C) 2007-2012 S�ren Hauberg +@c Copyright (C) 2007-2012 Søren Hauberg @c @c This file is part of Octave. @c @@ -181,7 +181,6 @@ following be referred to as @code{package} and may contain the following files: -@noindent @table @code @item package/COPYING This is a required file containing the license of the package. No @@ -260,7 +259,6 @@ Besides the above mentioned files, a package can also contain on or more of the following directories: -@noindent @table @code @item package/inst An optional directory containing any files that are directly installed @@ -305,7 +303,6 @@ package, such as its name, author, and version. This file has a very simple format -@noindent @itemize @item Lines starting with @samp{#} are comments. @@ -340,7 +337,6 @@ The package manager currently recognizes the following keywords -@noindent @table @code @item Name Name of the package. @@ -441,7 +437,6 @@ The optional @file{INDEX} file provides a categorical view of the functions in the package. This file has a very simple format -@noindent @itemize @item Lines beginning with @samp{#} are comments.
--- a/doc/interpreter/plot.txi +++ b/doc/interpreter/plot.txi @@ -811,11 +811,11 @@ @example @group x = 0:0.01:3; -plot(x,erf(x)); +plot (x, erf (x)); hold on; -plot(x,x,"r"); -axis([0, 3, 0, 1]); -text(0.65, 0.6175, strcat('\leftarrow x = @{2/\surd\pi', +plot (x,x,"r"); +axis ([0, 3, 0, 1]); +text (0.65, 0.6175, strcat ('\leftarrow x = @{2/\surd\pi', ' @{\fontsize@{16@}\int_@{\fontsize@{8@}0@}^@{\fontsize@{8@}x@}@}', ' e^@{-t^2@} dt@} = 0.6175')) @end group @@ -844,7 +844,7 @@ @end example @noindent -prints the current figure to a color PostScript printer. And, +prints the current figure to a color PostScript printer. And, @example print -deps foo.eps @@ -1180,6 +1180,7 @@ @cindex root figure properties The @code{root figure} properties are: + @table @code @item __modified__ --- Values: "on," "off" @@ -1252,6 +1253,7 @@ @cindex figure properties The @code{figure} properties are: + @table @code @item __graphics_toolkit__ --- The graphics toolkit currently in use. @@ -1335,6 +1337,7 @@ respectively. The functions are called with two input arguments. The first argument holds the handle of the calling figure. The second argument holds the event structure which has the following members: + @table @code @item Character The ASCII value of the key @@ -1356,6 +1359,7 @@ @item nextplot May be one of + @table @code @item "new" @@ -1451,6 +1455,7 @@ @cindex axes properties The @code{axes} properties are: + @table @code @item __modified__ @@ -1580,6 +1585,7 @@ @item nextplot May be one of + @table @code @item "new" @@ -1796,6 +1802,7 @@ @cindex line properties The @code{line} properties are: + @table @code @item __modified__ @@ -1907,6 +1914,7 @@ @cindex text properties The @code{text} properties are: + @table @code @item __modified__ @@ -2024,6 +2032,7 @@ @cindex image properties The @code{image} properties are: + @table @code @item __modified__ @@ -2100,6 +2109,7 @@ @cindex patch properties The @code{patch} properties are: + @table @code @item __modified__ @@ -2248,6 +2258,7 @@ @cindex surface properties The @code{surface} properties are: + @table @code @item __modified__ @@ -2523,6 +2534,7 @@ @table @code @item linestyle May be one of + @table @code @item "-" Solid line. [default] @@ -2551,6 +2563,7 @@ @cindex marker styles, graphics Marker styles are specified by the following properties: + @table @code @item marker A character indicating a plot marker to be place at each data point, or @@ -2597,7 +2610,7 @@ @code{set} function. For example, @example -plot (x, "DeleteFcn", @@(s, e) disp("Window Deleted")) +plot (x, "DeleteFcn", @@(s, e) disp ("Window Deleted")) @end example @noindent
--- a/doc/interpreter/poly.txi +++ b/doc/interpreter/poly.txi @@ -54,8 +54,8 @@ @example @group -N = length(c)-1; -val = dot( x.^(N:-1:0), c ); +N = length (c) - 1; +val = dot (x.^(N:-1:0), c); @end group @end example @@ -114,8 +114,8 @@ @example @group c = [1, 0, 1]; -integral = polyint(c); -area = polyval(integral, 3) - polyval(integral, 0) +integral = polyint (c); +area = polyval (integral, 3) - polyval (integral, 0) @result{} 12 @end group @end example @@ -149,7 +149,7 @@ The number of @var{breaks} (or knots) used to construct the piecewise polynomial is a significant factor in suppressing the noise present in -the input data, @var{x} and @var{y}. This is demostrated by the example +the input data, @var{x} and @var{y}. This is demonstrated by the example below. @example @@ -179,18 +179,17 @@ @float Figure,fig:splinefit1 @center @image{splinefit1,4in} @caption{Comparison of a fitting a piecewise polynomial with 41 breaks to one -with 11 breaks. The fit with the large number of breaks exhibits a fast ripple +with 11 breaks. The fit with the large number of breaks exhibits a fast ripple that is not present in the underlying function.} @end float @end ifnotinfo -The piece-wise polynomial fit, provided by @code{splinefit}, has -continuous derivatives up to the @var{order}-1. For example, a cubic fit -has continuous first and second derivatives. This is demonstrated by +The piecewise polynomial fit, provided by @code{splinefit}, has +continuous derivatives up to the @var{order}-1. For example, a cubic fit +has continuous first and second derivatives. This is demonstrated by the code @example -@group ## Data (200 points) x = 2 * pi * rand (1, 200); y = sin (x) + sin (2 * x) + 0.1 * randn (size (x)); @@ -215,7 +214,6 @@ axis tight ylim auto legend (@{"data", "order 0", "order 1", "order 2", "order 3", "order 4"@}) -@end group @end example @ifnotinfo @@ -225,7 +223,7 @@ @float Figure,fig:splinefit2 @center @image{splinefit2,4in} @caption{Comparison of a piecewise constant, linear, quadratic, cubic, and -quartic polynomials with 8 breaks to noisy data. The higher order solutions +quartic polynomials with 8 breaks to noisy data. The higher order solutions more accurately represent the underlying function, but come with the expense of computational complexity.} @end float @@ -266,12 +264,11 @@ @end float @end ifnotinfo -More complex constraints may be added as well. For example, the code below -illustrates a periodic fit with values that have been clamped at the end points, -and a second periodic fit which is hinged at the end points. +More complex constraints may be added as well. For example, the code below +illustrates a periodic fit with values that have been clamped at the endpoints, +and a second periodic fit which is hinged at the endpoints. @example -@group ## Data (200 points) x = 2 * pi * rand (1, 200); y = sin (2 * x) + 0.1 * randn (size (x)); @@ -293,7 +290,6 @@ axis tight ylim auto legend (@{"data", "clamped", "hinged periodic"@}) -@end group @end example @ifnotinfo @@ -303,7 +299,7 @@ @float Figure,fig:splinefit4 @center @image{splinefit4,4in} @caption{Comparison of two periodic piecewise cubic fits to a noisy periodic -signal. One fit has its end points clamped and the second has its end points +signal. One fit has its endpoints clamped and the second has its endpoints hinged.} @end float @end ifnotinfo @@ -314,7 +310,6 @@ suppression and a third illustrating the non-robust solution. @example -@group ## Data x = linspace (0, 2*pi, 200); y = sin (x) + sin (2 * x) + 0.05 * randn (size (x)); @@ -339,7 +334,6 @@ "robust, beta = 0.75", "no robust fitting"@}) axis tight ylim auto -@end group @end example @ifnotinfo @@ -348,7 +342,7 @@ @float Figure,fig:splinefit6 @center @image{splinefit6,4in} -@caption{Comparison of two different levels of robust fitting (@var{beta} = 0.25 and 0.75) to noisy data combined with outlying data. A conventional fit, without +@caption{Comparison of two different levels of robust fitting (@var{beta} = 0.25 and 0.75) to noisy data combined with outlying data. A conventional fit, without robust fitting (@var{beta} = 0) is also included.} @end float @end ifnotinfo @@ -367,10 +361,10 @@ p = [ 0, 1, 0; 1, -2, 1; 0, -1, 1 ]; -pp = mkpp(x, p); -xi = linspace(-2, 2, 50); -yi = ppval(pp, xi); -plot(xi, yi); +pp = mkpp (x, p); +xi = linspace (-2, 2, 50); +yi = ppval (pp, xi); +plot (xi, yi); @end group @end example
--- a/doc/interpreter/quad.txi +++ b/doc/interpreter/quad.txi @@ -338,7 +338,7 @@ @ifnottex the sum over @code{i=1:n} and @code{j=1:n} of @code{q(i)*q(j)*f(r(i),r(j))}, @end ifnottex -where @math{q} and @math{r} is as returned by @code{colloc(n)}. The +where @math{q} and @math{r} is as returned by @code{colloc (n)}. The generalization to more than two variables is straight forward. The following code computes the studied integral using @math{n=8} points.
--- a/doc/interpreter/set.txi +++ b/doc/interpreter/set.txi @@ -40,7 +40,7 @@ @code{y} contains two sets, then @example -union(x, y) +union (x, y) @end example @noindent
--- a/doc/interpreter/sparse.txi +++ b/doc/interpreter/sparse.txi @@ -106,7 +106,7 @@ @example @group for (j = 0; j < nc; j++) - for (i = cidx (j); i < cidx(j+1); i++) + for (i = cidx(j); i < cidx(j+1); i++) printf ("non-zero element (%i,%i) is %d\n", ridx(i), j, data(i)); @end group @@ -212,7 +212,7 @@ that corresponds to this. For example, @example -s = diag (sparse(randn(1,n)), -1); +s = diag (sparse (randn (1,n)), -1); @end example @noindent @@ -348,8 +348,8 @@ @example @group -a = tril (sprandn(1024, 1024, 0.02), -1) ... - + speye(1024); +a = tril (sprandn (1024, 1024, 0.02), -1) ... + + speye (1024); matrix_type (a); ans = Lower @end group @@ -363,7 +363,7 @@ @example @group a = matrix_type (tril (sprandn (1024, ... - 1024, 0.02), -1) + speye(1024), 'Lower'); + 1024, 0.02), -1) + speye (1024), "Lower"); @end group @end example @@ -398,10 +398,10 @@ @example @group -A = sparse([2,6,1,3,2,4,3,5,4,6,1,5], +A = sparse ([2,6,1,3,2,4,3,5,4,6,1,5], [1,1,2,2,3,3,4,4,5,5,6,6],1,6,6); xy = [0,4,8,6,4,2;5,0,5,7,5,7]'; -gplot(A,xy) +gplot (A,xy) @end group @end example @@ -422,8 +422,8 @@ calculated in linear time without explicitly needing to calculate the Cholesky@tie{}factorization by the @code{etree} command. This command returns the elimination tree of the matrix and can be displayed -graphically by the command @code{treeplot(etree(A))} if @code{A} is -symmetric or @code{treeplot(etree(A+A'))} otherwise. +graphically by the command @code{treeplot (etree (A))} if @code{A} is +symmetric or @code{treeplot (etree (A+A'))} otherwise. @DOCSTRING(spy) @@ -519,7 +519,7 @@ @example @group -speye(3) + 0 +speye (3) + 0 @result{} 1 0 0 0 1 0 0 0 1 @@ -541,7 +541,7 @@ one area where it does cause a problem is where a sparse matrix is promoted to a full matrix, where subsequent operations would resparsify the matrix. Such cases are rare, but can be artificially created, for -example @code{(fliplr(speye(3)) + speye(3)) - speye(3)} gives a full +example @code{(fliplr (speye (3)) + speye (3)) - speye (3)} gives a full matrix when it should give a sparse one. In general, where such cases occur, they impose only a small memory penalty. @@ -551,7 +551,7 @@ depending on the type of its input arguments. So @example - a = diag (sparse([1,2,3]), -1); + a = diag (sparse ([1,2,3]), -1); @end example @noindent @@ -655,7 +655,7 @@ The standard Cholesky@tie{}factorization of this matrix can be obtained by the same command that would be used for a full matrix. This can be visualized with the command -@code{r = chol(A); spy(r);}. +@code{r = chol (A); spy (r);}. @xref{fig:simplechol}. The original matrix had @ifinfo @@ -682,8 +682,8 @@ The appropriate sparsity preserving permutation of the original matrix is given by @dfn{symamd} and the factorization using this -reordering can be visualized using the command @code{q = symamd(A); -r = chol(A(q,q)); spy(r)}. This gives +reordering can be visualized using the command @code{q = symamd (A); +r = chol (A(q,q)); spy (r)}. This gives @ifinfo @ifnothtml 29 @@ -697,7 +697,7 @@ The Cholesky@tie{}factorization itself can be used to determine the appropriate sparsity preserving reordering of the matrix during the factorization, In that case this might be obtained with three return -arguments as r@code{[r, p, q] = chol(A); spy(r)}. +arguments as @code{[r, p, q] = chol (A); spy (r)}. @float Figure,fig:simplechol @center @image{spchol,4in} @@ -712,7 +712,7 @@ In the case of an asymmetric matrix, the appropriate sparsity preserving permutation is @dfn{colamd} and the factorization using this reordering can be visualized using the command -@code{q = colamd(A); [l, u, p] = lu(A(:,q)); spy(l+u)}. +@code{q = colamd (A); [l, u, p] = lu (A(:,q)); spy (l+u)}. Finally, Octave implicitly reorders the matrix when using the div (/) and ldiv (\) operators, and so no the user does not need to explicitly @@ -948,23 +948,23 @@ @example @group - node_y= [1;1.2;1.5;1.8;2]*ones(1,11); - node_x= ones(5,1)*[1,1.05,1.1,1.2, ... + node_y = [1;1.2;1.5;1.8;2]*ones(1,11); + node_x = ones(5,1)*[1,1.05,1.1,1.2, ... 1.3,1.5,1.7,1.8,1.9,1.95,2]; - nodes= [node_x(:), node_y(:)]; + nodes = [node_x(:), node_y(:)]; - [h,w]= size(node_x); - elems= []; - for idx= 1:w-1 - widx= (idx-1)*h; - elems= [elems; ... + [h,w] = size (node_x); + elems = []; + for idx = 1:w-1 + widx = (idx-1)*h; + elems = [elems; ... widx+[(1:h-1);(2:h);h+(1:h-1)]'; ... widx+[(2:h);h+(2:h);h+(1:h-1)]' ]; endfor - E= size(elems,1); # No. of simplices - N= size(nodes,1); # No. of vertices - D= size(elems,2); # dimensions+1 + E = size (elems,1); # No. of simplices + N = size (nodes,1); # No. of vertices + D = size (elems,2); # dimensions+1 @end group @end example @@ -1001,32 +1001,32 @@ calculated. @example - # Element conductivity - conductivity= [1*ones(1,16), ... + ## Element conductivity + conductivity = [1*ones(1,16), ... 2*ones(1,48), 1*ones(1,16)]; - # Connectivity matrix + ## Connectivity matrix C = sparse ((1:D*E), reshape (elems', ... D*E, 1), 1, D*E, N); - # Calculate system matrix + ## Calculate system matrix Siidx = floor ([0:D*E-1]'/D) * D * ... ones(1,D) + ones(D*E,1)*(1:D) ; - Sjidx = [1:D*E]'*ones(1,D); - Sdata = zeros(D*E,D); - dfact = factorial(D-1); - for j=1:E - a = inv([ones(D,1), ... + Sjidx = [1:D*E]'*ones (1,D); + Sdata = zeros (D*E,D); + dfact = factorial (D-1); + for j = 1:E + a = inv ([ones(D,1), ... nodes(elems(j,:), :)]); const = conductivity(j) * 2 / ... - dfact / abs(det(a)); + dfact / abs (det (a)); Sdata(D*(j-1)+(1:D),:) = const * ... a(2:D,:)' * a(2:D,:); endfor - # Element-wise system matrix - SE= sparse(Siidx,Sjidx,Sdata); - # Global system matrix - S= C'* SE *C; + ## Element-wise system matrix + SE = sparse(Siidx,Sjidx,Sdata); + ## Global system matrix + S = C'* SE *C; @end example The system matrix acts like the conductivity @@ -1047,23 +1047,23 @@ solve for the voltages at each vertex @code{V}. @example - # Dirichlet boundary conditions - D_nodes=[1:5, 51:55]; - D_value=[10*ones(1,5), 20*ones(1,5)]; + ## Dirichlet boundary conditions + D_nodes = [1:5, 51:55]; + D_value = [10*ones(1,5), 20*ones(1,5)]; - V= zeros(N,1); + V = zeros (N,1); V(D_nodes) = D_value; idx = 1:N; # vertices without Dirichlet # boundary condns idx(D_nodes) = []; - # Neumann boundary conditions. Note that - # N_value must be normalized by the - # boundary length and element conductivity - N_nodes=[]; - N_value=[]; + ## Neumann boundary conditions. Note that + ## N_value must be normalized by the + ## boundary length and element conductivity + N_nodes = []; + N_value = []; - Q = zeros(N,1); + Q = zeros (N,1); Q(N_nodes) = N_value; V(idx) = S(idx,idx) \ ( Q(idx) - ... @@ -1082,8 +1082,8 @@ xelems = reshape (nodes(elemx, 1), 4, E); yelems = reshape (nodes(elemx, 2), 4, E); velems = reshape (V(elemx), 4, E); - plot3 (xelems,yelems,velems,'k'); - print ('grid.eps'); + plot3 (xelems,yelems,velems,"k"); + print "grid.eps"; @end group @end example
--- a/doc/interpreter/stmt.txi +++ b/doc/interpreter/stmt.txi @@ -560,11 +560,11 @@ @example @group -disp("Loop over a matrix") +disp ("Loop over a matrix") for i = [1,3;2,4] i endfor -disp("Loop over a cell array") +disp ("Loop over a cell array") for i = @{1,"two";"three",4@} i endfor @@ -580,7 +580,7 @@ @example @group -a = [1,3;2,4]; c = cat(3, a, 2*a); +a = [1,3;2,4]; c = cat (3, a, 2*a); for i = c i endfor @@ -589,8 +589,8 @@ @noindent In the above case, the multi-dimensional matrix @var{c} is reshaped to a -two-dimensional matrix as @code{reshape (c, rows(c), -prod(size(c)(2:end)))} and then the same behavior as a loop over a two +two-dimensional matrix as @code{reshape (c, rows (c), +prod (size (c)(2:end)))} and then the same behavior as a loop over a two dimensional matrix is produced. Although it is possible to rewrite all @code{for} loops as @code{while}
--- a/doc/interpreter/testfun.txi +++ b/doc/interpreter/testfun.txi @@ -72,7 +72,7 @@ %! get = kron (@var{b}, @var{a}); %! if (any (size (expect) != size (get))) %! error ("wrong size: expected %d,%d but got %d,%d", -%! size(expect), size(get)); +%! size (expect), size (get)); %! elseif (any (any (expect != get))) %! error ("didn't get what was expected."); %! endif
--- a/doc/interpreter/vectorize.txi +++ b/doc/interpreter/vectorize.txi @@ -191,6 +191,7 @@ @item Repetition + @itemize @item repmat @@ -201,6 +202,7 @@ @item Vectorized arithmetic + @itemize @item sum @@ -232,6 +234,7 @@ @item Shape of higher dimensional arrays + @itemize @item reshape @@ -342,8 +345,8 @@ subtraction takes place. A special case of broadcasting that may be familiar is when all -dimensions of the array being broadcast are 1, i.e. the array is a -scalar. Thus for example, operations like @code{x - 42} and @code{max +dimensions of the array being broadcast are 1, i.e., the array is a +scalar. Thus for example, operations like @code{x - 42} and @code{max (x, 2)} are basic examples of broadcasting. For a higher-dimensional example, suppose @code{img} is an RGB image of @@ -657,7 +660,7 @@ @group n = length (A); B = zeros (n, 2); -for i = 1:length(A) +for i = 1:length (A) ## this will be two columns, the first is the difference and ## the second the mean of the two elements used for the diff. B(i,:) = [A(i+1)-A(i), (A(i+1) + A(i))/2)];
--- a/doc/refcard/refcard.tex +++ b/doc/refcard/refcard.tex @@ -679,7 +679,7 @@ \sec Paths and Packages; path&display the current Octave function path.\cr pathdef&display the default path.\cr -addpath({\it dir})&add a directory to the path.\cr +addpath ({\it dir})&add a directory to the path.\cr EXEC\_PATH&manipulate the Octave executable path.\cr pkg list&display installed packages.\cr pkg load {\it pack}&Load an installed package.\cr @@ -688,8 +688,8 @@ \sec Cells and Structures; {\it{var}}.{\it{field}} = ...&set a field of a structure.\cr {\it{var}}$\{${\it{idx}}$\}$ = ...&set an element of a cell array.\cr -cellfun({\it f}, {\it c})&apply a function to elements of cell array.\cr -fieldnames({\it s})&returns the fields of a structure.\cr +cellfun ({\it f}, {\it c})&apply a function to elements of cell array.\cr +fieldnames ({\it s})&returns the fields of a structure.\cr \endsec \widesec Statements; @@ -803,10 +803,10 @@ values\cr \endsec -% sin({\it a}) cos({\it a}) tan({\it a})&trigonometric functions\cr -% asin({\it a}) acos({\it a}) atan({\it a})&inverse trigonometric functions\cr -% sinh({\it a}) cosh({\it a}) tanh({\it a})&hyperbolic trig functions\cr -% asinh({\it a}) acosh({\it a}) atanh({\it a})&inverse hyperbolic trig +% sin ({\it a}) cos({\it a}) tan({\it a})&trigonometric functions\cr +% asin ({\it a}) acos({\it a}) atan({\it a})&inverse trigonometric functions\cr +% sinh ({\it a}) cosh({\it a}) tanh({\it a})&hyperbolic trig functions\cr +% asinh ({\it a}) acosh({\it a}) atanh({\it a})&inverse hyperbolic trig % functions\cr\cr \sec Linear Algebra;
--- a/etc/OLD-ChangeLogs/ChangeLog +++ b/etc/OLD-ChangeLogs/ChangeLog @@ -1882,7 +1882,7 @@ (--enable-strict-warning-flags): Rename from --enable-picky-flags. (GXX_STRICT_FLAGS): Remove -Wenum-clash from the list. -2009-03-08 S�ren Hauberg <hauberg@gmail.com> +2009-03-08 Søren Hauberg <hauberg@gmail.com> * NEWS: Mention 'histc'. @@ -2652,7 +2652,7 @@ * aclocal.m4 (OCTAVE_PROG_GNUPLOT): Drop check for multiple plot windows. -2007-08-10 S�ren Hauberg <hauberg@gmail.com> +2007-08-10 Søren Hauberg <hauberg@gmail.com> * ROADMAP: Update for current sources. @@ -2973,7 +2973,7 @@ * Makeconf.in (simple-move-if-change-rule, (builddir-move-if-change-rule): New macros. -2006-11-11 S�ren Hauberg <hauberg@gmail.com> +2006-11-11 Søren Hauberg <hauberg@gmail.com> * examples/Makefile.in (uninstall): Add missing semicolon. @@ -3183,7 +3183,7 @@ 2006-09-27 John W. Eaton <jwe@octave.org> * mkoctfile.in [--mex]: Include -I. in incflags. - From S�ren Hauberg <hauberg@gmail.com>. + From Søren Hauberg <hauberg@gmail.com>. 2006-09-26 John W. Eaton <jwe@octave.org> @@ -3565,7 +3565,7 @@ * configure.in: Use it. * Makeconf.in: Substitute DESKTOP_FILE_INSTALL. - * octave.desktop.in: New file. From S�ren Hauberg <hauberg@gmail.com>. + * octave.desktop.in: New file. From Søren Hauberg <hauberg@gmail.com>. * examples/Makefile.in (SOURCES): Add it to the list. (octave.desktop): New target. (all): Depend on octave.desktop.
--- a/etc/OLD-ChangeLogs/doc-ChangeLog +++ b/etc/OLD-ChangeLogs/doc-ChangeLog @@ -1311,11 +1311,11 @@ * interpreter/oop.txi: Update docs of polynomial class, mention chained indexing. -2009-05-27 S�ren Hauberg <hauberg@gmail.com> +2009-05-27 Søren Hauberg <hauberg@gmail.com> * interpreter/errors.txi: fix 'print_usage' output. -2009-05-27 S�ren Hauberg <hauberg@gmail.com> +2009-05-27 Søren Hauberg <hauberg@gmail.com> * interpreter/bugs.txi: fix call to 'page_screen_output'. @@ -1456,7 +1456,7 @@ * interpreter/Makefile.in (DISTFILES): Use doc-cache instead of DOC for doc cache file. -2009-03-08 S�ren Hauberg <hauberg@gmail.com> +2009-03-08 Søren Hauberg <hauberg@gmail.com> * interpreter/stats.txi (Basic Statistical Functions): Add the 'histc' function. @@ -1542,11 +1542,11 @@ (DISTFILES): Add DOC nad mk_doc_cache.m to the list. * mk_doc_cache.m: New file. -2009-02-01 S�ren Hauberg <hauberg@gmail.com> +2009-02-01 Søren Hauberg <hauberg@gmail.com> * interpreter/nonlin.txi: Remove reference to 'fsolve_options'. -2009-02-01 S�ren Hauberg <hauberg@gmail.com> +2009-02-01 Søren Hauberg <hauberg@gmail.com> * interpreter/system.txi: Remove reference to 'eomdate'. @@ -1562,7 +1562,7 @@ * vr-idx.txi: Delete. * interpreter/Makefile.in (SUB_SOURCE): Remove it from the list. -2009-01-22 S�ren Hauberg <hauberg@gmail.com> +2009-01-22 Søren Hauberg <hauberg@gmail.com> * interpreter/func.txi: Put varargin and varargout in concept index. * interpreter/var.txi: Put ans in concept index. @@ -1684,12 +1684,12 @@ * interpreter/contrib.txi: correction of the mercurial example * interpreter/container.txi: minor correction of the text -2008-09-25 S�ren Hauberg <hauberg@gmail.com> +2008-09-25 Søren Hauberg <hauberg@gmail.com> * interpreter/image.txi: Update for imread and imwrite instead of loadimge and saveimage. -2008-09-24 S�ren Hauberg <hauberg@gmail.com> +2008-09-24 Søren Hauberg <hauberg@gmail.com> * interpreter/image.txi: Document imfinfo. @@ -1738,7 +1738,7 @@ * interpreter/numbers.txi: Document intwarning. -2008-08-06 S�ren Hauberg <hauberg@gmail.com> +2008-08-06 Søren Hauberg <hauberg@gmail.com> * interpreter/basics.txi, interpreter/errors.txi, interpreter/expr.txi, interpreter/func.txi, @@ -1955,7 +1955,7 @@ * refcard/refcard.tex: Update for 3.0. -2007-10-15 S�ren Hauberg <hauberg@gmail.com> +2007-10-15 Søren Hauberg <hauberg@gmail.com> * interpreter/preface.txi, interpreter/basics.txi, interpreter/strings.txi, interpreter/container.txi, @@ -1987,7 +1987,7 @@ 2007-10-06 John W. Eaton <jwe@octave.org> - * interpreter/octave.texi: Add David Bateman and S�ren Hauberg as + * interpreter/octave.texi: Add David Bateman and Søren Hauberg as authors. 2006-09-28 Henry Mollet mollet@pacbell.net @@ -2019,7 +2019,7 @@ * interpreter/geometry.txi: Check whether TEXINFO_QHULL is set before including certain figures. -2007-08-31 S�ren Hauberg <hauberg@gmail.com> +2007-08-31 Søren Hauberg <hauberg@gmail.com> * interpreter/nonlin.txi: Extended the example. @@ -2102,7 +2102,7 @@ * interpreter/interp.txi: Also change figures here. * interpreter/Makefile.in: and here. -2007-06-18 S�ren Hauberg <hauberg@gmail.com> +2007-06-18 Søren Hauberg <hauberg@gmail.com> * interpreter/optim.txi: Added some introductory text to each section. @@ -2148,7 +2148,7 @@ chapter. Remove references to Hashing chapter and hashing.texi, and subsections for hashing to system utilities chapter. -2007-06-12 2007-06-10 S�ren Hauberg <hauberg@gmail.com> +2007-06-12 2007-06-10 Søren Hauberg <hauberg@gmail.com> * interpreter/diffeq.txi: Note that x-dot is the derivative of x. @@ -2176,7 +2176,7 @@ * interpreter/Makefile.in ($(HTML_IMAGES_PNG)): Use cp instead of INSTALL_DATA to copy files to the HTML directory. -2007-05-28 S�ren Hauberg <hauberg@gmail.com> +2007-05-28 Søren Hauberg <hauberg@gmail.com> * interpreter/errors.txi: Add new sections and some more detailed descriptions on errors and warnings. @@ -2184,7 +2184,7 @@ interpreter/var.txi: Add references to the new sections in errors.txi. -2007-05-28 S�ren Hauberg <hauberg@gmail.com> +2007-05-28 Søren Hauberg <hauberg@gmail.com> * interpreter/io.txi: Rearrange some sections, and add a few examples. @@ -2218,7 +2218,7 @@ * interpreter/debug.txi, io.txi, octave.txi: Doc fixes. -2007-05-21 S�ren Hauberg <hauberg@gmail.com> +2007-05-21 Søren Hauberg <hauberg@gmail.com> * interpreter/expr.txi: Describe +=, -=, *=, and /= operators. Add new example. @@ -2240,7 +2240,7 @@ * interpreter/func.txi: Additional documentation for function locking, dispatch and autoloading. -2007-05-16 S�ren Hauberg <hauberg@gmail.com> +2007-05-16 Søren Hauberg <hauberg@gmail.com> * interpreter/expr.txi: Improve docs. @@ -2250,7 +2250,7 @@ interpreter/intro.txi, interpreter/numbers.txi, interpreter/octave.texi, interpreter/preface.txi: Doc fixes. -2007-04-18 S�ren Hauberg <hauberg@gmail.com> +2007-04-18 Søren Hauberg <hauberg@gmail.com> * interpreter/package.texi: Document "*" flag for loaded packages. @@ -2333,7 +2333,7 @@ * Makefile.in (SUB_SOURCE): Include dynamic.txi in the list. -2007-04-18 S�ren Hauberg <hauberg@gmail.com> +2007-04-18 Søren Hauberg <hauberg@gmail.com> * interpreter/package.texi: New file. * octave/texi: @include it, add it to the menus. @@ -2358,7 +2358,7 @@ * interpreter/stream.txi: Delete. * interpreter/Makefile.in (SUB_SOURCE): Remove it from the list. -2007-04-16 S�ren Hauberg <hauberg@gmail.com> +2007-04-16 Søren Hauberg <hauberg@gmail.com> * intrepreter/stmt.txi: Improve documentation of switch statement. @@ -2370,15 +2370,15 @@ * interpreter/image.txi: Update docs. -2007-04-11 S�ren Hauberg <hauberg@gmail.com> +2007-04-11 Søren Hauberg <hauberg@gmail.com> * interpreter/container.txi: Document indexing with (). -2007-04-11 S�ren Hauberg <hauberg@gmail.com> +2007-04-11 Søren Hauberg <hauberg@gmail.com> * interpreter/container.txi: Improve cell array documentation. -2007-04-09 S�ren Hauberg <hauberg@gmail.com> +2007-04-09 Søren Hauberg <hauberg@gmail.com> * interpreter/func.txi: Document varargin, varargout, and default argument values.
--- a/etc/OLD-ChangeLogs/liboctave-ChangeLog +++ b/etc/OLD-ChangeLogs/liboctave-ChangeLog @@ -1480,7 +1480,7 @@ Remove occurences of ftrunc, fnon_int and fnan eveywhere. * oct-inttypes.cc: Ditto last sentence. Remove warning tests. -2010-03-07 Soren Hauberg <hauberg@gmail.com> +2010-03-07 Søren Hauberg <hauberg@gmail.com> * dim-vector.h: New constructor accepting a C array of dimensions.
--- a/etc/OLD-ChangeLogs/scripts-ChangeLog +++ b/etc/OLD-ChangeLogs/scripts-ChangeLog @@ -1585,7 +1585,7 @@ * audio/setaudio.m: Re-write docstring. -2010-12-23 Soren Hauberg <hauberg@gmail.com> +2010-12-23 Søren Hauberg <hauberg@gmail.com> * signal/detrend.m: Also accept polynomial order as a string ("constant" or "linear") for compatibility with Matlab. @@ -2863,7 +2863,7 @@ * general/interpn.m: Convert interpolation vectors of non-equal length to nd-arrays. -2010-07-26 Soren Hauberg <hauberg@gmail.com> +2010-07-26 Søren Hauberg <hauberg@gmail.com> * image/image.m: Replace parenthesis with curly bracket in Texinfo. @@ -3065,7 +3065,7 @@ * newplot.m: Conditionally initialisation the line style and color based on the __hold_all__ axes property. -2010-07-04 Soren Hauberg <hauberg@gmail.com> +2010-07-04 Søren Hauberg <hauberg@gmail.com> * polynomial/deconv.m: ensure that the orientation of the third input to 'filter' matches the orientation of 'y'. @@ -3733,17 +3733,17 @@ * plot/refreshdata.m: Don't use cell2mat on cell array of cell arrays. -2010-03-22 Soren Hauberg <hauberg@gmail.com> +2010-03-22 Søren Hauberg <hauberg@gmail.com> * image/gmap40.m, image/hot.m, image/hsv2rgb.m, image/image.m, image/image_viewer.m, image/imfinfo.m, image/imread.m, image/imshow.m, image/saveimage: Detabify. -2010-03-21 Soren Hauberg <hauberg@gmail.com> +2010-03-21 Søren Hauberg <hauberg@gmail.com> * general/quadv.m: Replace 'quadl' with 'quadv' in help text. -2010-03-20 Soren Hauberg <hauberg@gmail.com> +2010-03-20 Søren Hauberg <hauberg@gmail.com> * general/interp2.m: For nearest neighbour interpolation ceil (instead of floor) at the center of the data intervals to be @@ -3782,12 +3782,12 @@ * strings/strchr.m: Optimize. -2010-03-05 Soren Hauberg <hauberg@gmail.com> +2010-03-05 Søren Hauberg <hauberg@gmail.com> * pkg/pkg.m (write_index): include classes in autogenerated INDEX files. -2010-03-05 Soren Hauberg <hauberg@gmail.com> +2010-03-05 Søren Hauberg <hauberg@gmail.com> * plot/fplot.m: Ensure that 'limits' is a 2 or 4 vector, and that 'fn' is a function. @@ -4738,7 +4738,7 @@ * general/tril.m, general/triu.m: Remove sources. * general/Makefile.in: Update. -2009-10-20 Soren Hauberg <hauberg@gmail.com> +2009-10-20 Søren Hauberg <hauberg@gmail.com> * general/interp2.m: improved error checking and support for bicubic interpolation when X and Y are meshgrid format. @@ -4749,7 +4749,7 @@ instead of multiple ifs). * polynomial/pchip.m: Employ more optimized formulas (from SLATEC). -2009-10-22 Soren Hauberg <hauberg@gmail.com> +2009-10-22 Søren Hauberg <hauberg@gmail.com> * image/autumn.m, image/bone.m, image/cool.m, image/copper.m, image/flag.m, image/gmap40.m, image/gray.m, image/hot.m, @@ -4757,11 +4757,11 @@ image/prism.m, image/rainbow.m, image/spring.m, image/summer.m, image/white.m, image/winter.m: Add demos. -2009-10-20 Soren Hauberg <hauberg@gmail.com> +2009-10-20 Søren Hauberg <hauberg@gmail.com> * general/interp2.m: improved error checking and support for bicubic -2009-10-19 Soren Hauberg <hauberg@gmail.com> +2009-10-19 Søren Hauberg <hauberg@gmail.com> * io/strread.m, io/textread.m: New functions. @@ -5242,7 +5242,7 @@ * plot/__go_draw_axes__.m: Fix rendering of overlaping images and line objects. Add demos as well. -2009-05-27 S�ren Hauberg <hauberg@gmail.com> +2009-05-27 Søren Hauberg <hauberg@gmail.com> * geometry/delaunay.m: Support cellstr's as options. @@ -5250,7 +5250,7 @@ * plot/imshow.m: Fix handling of indexed images. -2009-05-26 S�ren Hauberg <hauberg@gmail.com> +2009-05-26 Søren Hauberg <hauberg@gmail.com> * help/__makeinfo__.m: Support several @seealso's in one text. @@ -5621,7 +5621,7 @@ __accumarray_sum__ for the default summation case. * statistics/base/histc.m: Reimplement using lookup & accumarray. -2009-03-08 S�ren Hauberg <hauberg@gmail.com> +2009-03-08 Søren Hauberg <hauberg@gmail.com> * statistics/base/histc.m: New function. @@ -5959,12 +5959,12 @@ * general/sortrows.m: Call __sort_rows_idx__, not __sortrows_idx__. -2009-02-12 Soren Hauberg <hauberg@gmail.com> +2009-02-12 Søren Hauberg <hauberg@gmail.com> * help/gen_doc_cache.m: Change API so we only handle one directory per call to this function. -2009-02-12 Soren Hauberg <hauberg@gmail.com> +2009-02-12 Søren Hauberg <hauberg@gmail.com> * help/lookfor.m: Adapt to new cache scheme. @@ -6012,7 +6012,7 @@ * help/which.m: Still print something sensible if type is empty. -2009-02-04 Soren Hauberg <hauberg@gmail.com> +2009-02-04 Søren Hauberg <hauberg@gmail.com> Thomas Treichl <Thomas.Treichl@gmx.net> * miscellaneous/Makefile.in (SOURCES): Add bzip2.m to the list. @@ -6107,7 +6107,7 @@ * plot/__go_draw_axes__.m: Add support for transparent patches. -2009-01-29 S�ren Hauberg <hauberg@gmail.com> +2009-01-29 Søren Hauberg <hauberg@gmail.com> * help/help.m, help/print_usage.m, help/get_first_help_sentence.m: print sensible error message when function is found but not documented. @@ -6160,7 +6160,7 @@ * polynomial/spline.m: Doc fix. -2009-01-27 S�ren Hauberg <hauberg@gmail.com> +2009-01-27 Søren Hauberg <hauberg@gmail.com> * general/gradient.m: Handle computing the gradient of a function handle. @@ -6206,7 +6206,7 @@ * sparse/svds.m: svds.m: skip tests if ARPACK is missing. -2009-01-23 S�ren Hauberg <hauberg@gmail.com> +2009-01-23 Søren Hauberg <hauberg@gmail.com> * help/type.m: Make 'type X' work, when X is the name of a variable. @@ -6220,7 +6220,7 @@ * help/__additional_help_message__.m: Return message instead of displaying it. -2009-01-22 S�ren Hauberg <hauberg@gmail.com> +2009-01-22 Søren Hauberg <hauberg@gmail.com> * help: New directory. * configure.in (AC_CONFIG_FILES): Add help/Makefile to the list. @@ -6311,7 +6311,7 @@ * plot/__go_draw_axes__.m (ticklabel_to_cell): New function. Use it to handle non-cell ticklabels. -2009-01-14 S�ren Hauberg <hauberg@gmail.com> +2009-01-14 Søren Hauberg <hauberg@gmail.com> * general/diff.m, general/logspace.m, general/nextpow2.m, linear-algebra/commutation_matrix.m, @@ -6695,7 +6695,7 @@ * optimization/qp.m: Convert bounds of the form b <= x <= b and constraints of the form b <= A*x <= b to equality constraints. -2008-10-27 S�ren Hauberg <hauberg@gmail.com> +2008-10-27 Søren Hauberg <hauberg@gmail.com> * plot/ellipsoid.m: Check nargin == 6, not nargin == 5. @@ -6972,7 +6972,7 @@ * image/imfinfo.m: Delete temporary file. -2008-09-25 S�ren Hauberg <hauberg@gmail.com> +2008-09-25 Søren Hauberg <hauberg@gmail.com> * image/imread.m, image/imwrite.m: Doc fix. @@ -6980,7 +6980,7 @@ * plot/fplot.m: Call axis after calling plot. -2008-09-24 S�ren Hauberg <hauberg@gmail.com> +2008-09-24 Søren Hauberg <hauberg@gmail.com> * image/imfinfo.m: New function. * image/Makefile.in (SOURCES): Add it to the list. @@ -7450,7 +7450,7 @@ Change caller. Improve sizing and position of colorbox for subplots. * plot/colorbar.m: New demos. -2008-04-16 S�ren Hauberg <hauberg@gmail.com> +2008-04-16 Søren Hauberg <hauberg@gmail.com> * plot/__gnuplot_version__.m: Display error if gnuplot is not found. @@ -7740,7 +7740,7 @@ * miscellaneous/info.m: New function. * miscellaneous/Makefile.in (SOURCES): Add it to the list. -2008-03-27 S�ren Hauberg <hauberg@gmail.com> +2008-03-27 Søren Hauberg <hauberg@gmail.com> * plot/xlim.m, plot/ylim.m, plot/zlim.m, strings/strtrim.m: Doc fixes. @@ -7798,7 +7798,7 @@ * linear-algebra/dmult.m: Handle scaling along arbitrary dimension. -2008-03-26 S�ren Hauberg <hauberg@gmail.com> +2008-03-26 Søren Hauberg <hauberg@gmail.com> * polynomial/convn.m: New tests. @@ -7810,7 +7810,7 @@ statistics/base/prctile.m: New functions. * statistics/base/Makefile.in (SOURCES): Add them to the list. -2008-03-25 S�ren Hauberg <hauberg@gmail.com> +2008-03-25 Søren Hauberg <hauberg@gmail.com> * polynomial/convn.m: New function. * polynomial/Makefile.in (SOURCES): Add it to the list. @@ -8327,7 +8327,7 @@ * plot/axis.m: Correctly handle "tight" and "image" options. -2008-01-14 S�ren Hauberg <hauberg@gmail.com> +2008-01-14 Søren Hauberg <hauberg@gmail.com> * image/hsv2rgb.m, image/ntsc2rgb.m, image/rgb2hsv.m, image/rgb2ntsc.m: Also accept images as input. @@ -8388,7 +8388,7 @@ * general/sub2ind.m, general/ind2sub.m: Doc fix. -2008-01-04 S�ren Hauberg <hauberg@gmail.com> +2008-01-04 Søren Hauberg <hauberg@gmail.com> * set/create_set.m, set/union.m: Accept "rows" argument. @@ -8416,7 +8416,7 @@ Version 3.0.0 released. -2007-12-21 S�ren Hauberg <hauberg@gmail.com> +2007-12-21 Søren Hauberg <hauberg@gmail.com> * image/imshow.m: Accept empty value for display_range. @@ -8424,7 +8424,7 @@ * pkg/pkg.m: Add .lib as architecture-dependent suffix. -2007-12-19 S�ren Hauberg <hauberg@gmail.com> +2007-12-19 Søren Hauberg <hauberg@gmail.com> * image/imshow.m: Store uint8 images as doubles. Handle default display ranges correctly. @@ -9227,7 +9227,7 @@ * plot/print.m: Handle -textspecial and -textnormal flags for fig output. -2007-10-15 S�ren Hauberg <hauberg@gmail.com> +2007-10-15 Søren Hauberg <hauberg@gmail.com> * general/rat.m, sparse/pcg.m, sparse/pcr.m, optimization/sqp.m, statistics/models/logistic_regression.m, polynomial/polygcd.m, @@ -9412,7 +9412,7 @@ * polynomial/residue.m: New test from test/test_poly.m. -2007-10-06 S�ren Hauberg <hauberg@gmail.com> +2007-10-06 Søren Hauberg <hauberg@gmail.com> * image/saveimage.m: Handle saving color images without a colormap. * image/__img_via_file__.m: Add missing semicolon. @@ -9655,7 +9655,7 @@ * plot/ancestor.m: New function, adapted from Octave Forge. -2007-08-31 S�ren Hauberg <hauberg@gmail.com> +2007-08-31 Søren Hauberg <hauberg@gmail.com> * polynomial/polygcd.m: Better layout of example. * polynomial/compan.m: Remove unnecessary check. @@ -9889,7 +9889,7 @@ * plot/drawnow.m, plot/__go_draw_axes__.m: Use strcmpi instead of strcmp for selected property comparisons. -2007-06-25 S�ren Hauberg <hauberg@gmail.com> +2007-06-25 Søren Hauberg <hauberg@gmail.com> * image/imshow.m: Fix check for colormap arguments. @@ -9897,7 +9897,7 @@ * plot/drawnow.m: Handle GNUTERM=aqua if DISPLAY is not set. -2007-06-25 S�ren Hauberg <hauberg@gmail.com> +2007-06-25 Søren Hauberg <hauberg@gmail.com> * statistics/base/median.m: Update help text to mention 'dim' argument, and note that the data should be sorted for the @@ -9990,19 +9990,19 @@ * plot/__go_draw_axes__.m (do_tics, do_tics_1): New functions. (__go_draw_axes__): Call do_tics to handle tic marks. -2007-06-18 S�ren Hauberg <hauberg@gmail.com> +2007-06-18 Søren Hauberg <hauberg@gmail.com> * general/interp1.m, general/interp2.m, general/interp3.m, general/interpn.m: Replace, NaN with NA. Use isna instead of == to check for NA. -2007-06-18 S�ren Hauberg <hauberg@gmail.com> +2007-06-18 Søren Hauberg <hauberg@gmail.com> * optimization/glpk.m: TeXified the help text. * optimization/qp.m: TeXified the help text. * optimization/sqp.m: TeXified the help text. -2007-06-16 S�ren Hauberg <hauberg@gmail.com> +2007-06-16 Søren Hauberg <hauberg@gmail.com> * plot/legend.m: Replace 'vargin' with 'varargin'. @@ -10094,7 +10094,7 @@ * statistics/tests/wilcoxon_test.m: Error if N <= 25. -2007-06-12 S�ren Hauberg <soren@hauberg.org> +2007-06-12 Søren Hauberg <soren@hauberg.org> * plot/fplot.m: If function is inline, vectorize it. @@ -10121,7 +10121,7 @@ indexes into the installed package list indicating the packages to load and the order to load them in to respect the dependencies. -2007-06-03 S�ren Hauberg <soren@hauberg.org> +2007-06-03 Søren Hauberg <soren@hauberg.org> * plot/axes.m: Eliminate redundant else clause. @@ -10233,7 +10233,7 @@ * plot/hbar.m: Remove. * plot/barh.m: and move it here. -2007-05-16 S�ren Hauberg <soren@hauberg.org> +2007-05-16 Søren Hauberg <soren@hauberg.org> * general/sub2ind.m, general/ind2sub.m: Doc fix. @@ -10264,7 +10264,7 @@ * pkg/pkg.m: Mark loaded packages with "*". -2007-05-13 S�ren Hauberg <soren@hauberg.org> +2007-05-13 Søren Hauberg <soren@hauberg.org> * miscellaneous/single.m: Doc fix. Convert to double instead of returning argument unchanged. @@ -10349,7 +10349,7 @@ 2007-04-24 John W. Eaton <jwe@octave.org> * io/beep.m: Fix cut and paste error. - From S�ren Hauberg <soren@hauberg.org>. + From Søren Hauberg <soren@hauberg.org>. 2007-04-23 John W. Eaton <jwe@octave.org> @@ -10400,7 +10400,7 @@ * gethelp.cc (looks_like_octave_copyright): Use same logic as in looks_like_copyright in src/help.cc. - From S�ren Hauberg <soren@hauberg.org>. + From Søren Hauberg <soren@hauberg.org>. * plot/__go_draw_axes__.m: For log plots, omit zero values too. @@ -10765,7 +10765,7 @@ * miscellaneous/cast.m: Use feval and strcmp with cell to check arg instead of switch statement. - From S�ren Hauberg <soren@hauberg.org>. + From Søren Hauberg <soren@hauberg.org>. 2007-03-12 John W. Eaton <jwe@octave.org> @@ -11438,7 +11438,7 @@ * polynomial/spline.m: Make DG a column instead of a row vector. -2007-01-18 S�ren Hauberg <hauberg@gmail.com> +2007-01-18 Søren Hauberg <hauberg@gmail.com> * pkg/pkg.m (copy_files): Call write_INDEX with correct target file name. @@ -11460,11 +11460,11 @@ elfun/cscd.m, elfun/secd.m, elfun/sind.m, elfun/tand.m: New files. -2007-01-09 S�ren Hauberg <hauberg@gmail.com> +2007-01-09 Søren Hauberg <hauberg@gmail.com> * pkg/pkg.m: Allow filenames to contain glob patterns. -2007-01-08 S�ren Hauberg <hauberg@gmail.com> +2007-01-08 Søren Hauberg <hauberg@gmail.com> * pkg/pkg.m: Use copyfile instead of calling system. Use fullfile instead of concatenating with "/". Use mlock to ensure that @@ -11474,7 +11474,7 @@ * miscellaneous/copyfile.m, miscellaneous/movefile.m: Improve handling of file names containing globbing characters. - From S�ren Hauberg <hauberg@gmail.com>. + From Søren Hauberg <hauberg@gmail.com>. 2007-01-05 John W. Eaton <jwe@octave.org> @@ -11486,7 +11486,7 @@ * sparse/spfun.m: Check for "function_handle" not "function handle". * plot/fplot.m: Likewise. Use isa instead of strcmp + class. -2006-12-27 S�ren Hauberg <hauberg@gmail.com> +2006-12-27 Søren Hauberg <hauberg@gmail.com> * image/imshow.m: Strip NaNs from image. @@ -11501,7 +11501,7 @@ * startup/inputrc: Include sequences for Windows. -2006-12-06 S�ren Hauberg <hauberg@gmail.com> +2006-12-06 Søren Hauberg <hauberg@gmail.com> * pkg/pkg.m (unload_packages): New function. (pkg): Handle unload action. @@ -11578,7 +11578,7 @@ * image/image_viewer.m: Always return old values. Check arguments. * image/__img_gnuplot__.m: Rename from __img__m. -2006-11-14 S�ren Hauberg <soren@hauberg.org> +2006-11-14 Søren Hauberg <soren@hauberg.org> * image/image_viewer.m: New function. * image/__img_via_file__.m: New function. @@ -11608,7 +11608,7 @@ * general/__isequal__.m: Avoid assignment of comma-separated lists when comparing structs. -2006-11-13 S�ren Hauberg <hauberg@gmail.com> +2006-11-13 Søren Hauberg <hauberg@gmail.com> * general/bicubic.m, general/cart2pol.m, general/cart2sph.m, plot/contour.m, linear-algebra/cross.m, general/cumtrapz.m, @@ -11622,11 +11622,11 @@ * plot/mesh.m: Use size_equal to compare dimensions. -2006-11-13 S�ren Hauberg <soren@hauberg.org> +2006-11-13 Søren Hauberg <soren@hauberg.org> * plot/mesh.m: Simplify. Set hidden3d for the plot. -2006-11-11 S�ren Hauberg <soren@hauberg.org> +2006-11-11 Søren Hauberg <soren@hauberg.org> * miscellaneous/copyfile.m: Fix docs to match function. @@ -11674,7 +11674,7 @@ * startup/main-rcfile: Conditionally set PAGER_FLAGS. -2006-11-06 S�ren Hauberg <soren@hauberg.org> +2006-11-06 Søren Hauberg <soren@hauberg.org> * pkg/pkg.m (extract_pkg): No need to pass "dotexceptnewline" option to regexp. @@ -11720,7 +11720,7 @@ Daniel J Sebald <daniel.sebald@ieee.org> by way of Quentin Spencer <qspencer@ieee.org>. -2006-10-25 S�ren Hauberg <soren@hauberg.org> +2006-10-25 Søren Hauberg <soren@hauberg.org> * plot/__pltopt__.m: Update symbol marker id numbers for gnuplot 4. @@ -12034,7 +12034,7 @@ * pkg/pkg.m: Use fullfile to concatenate directory and file names. -2006-10-04 S�ren Hauberg <soren@hauberg.org> +2006-10-04 Søren Hauberg <soren@hauberg.org> * pkg/pkg.m: Update docs. Handle prefix option. Handle dependencies for load option. @@ -12047,7 +12047,7 @@ * plot/__init_plot_vars__.m: New function. * plot/__setup_plot__.m: Use __init_plot_vars__. -2006-10-03 S�ren Hauberg <soren@hauberg.org> +2006-10-03 Søren Hauberg <soren@hauberg.org> * pkg/pkg.m: Avoid calling addpath with no args. @@ -12103,7 +12103,7 @@ * deprecated/chisquare_pdf.m: Typo in documentation. -2006-09-22 S�ren Hauberg <soren@hauberg.org> +2006-09-22 Søren Hauberg <soren@hauberg.org> * signal/filter2.m: Correct texinfo doc. @@ -12182,7 +12182,7 @@ * image/saveimage.m: Use logical indexing instead of indices computed by calling find on the logical index. -2006-08-24 S�ren Hauberg <soren@hauberg.org> +2006-08-24 Søren Hauberg <soren@hauberg.org> * miscellaneous/bincoeff.m, specfun/factorial.m: Use logical indexing instead of indices computed by calling find @@ -12210,7 +12210,7 @@ PKG_ADD directives and append user supplied PKG_ADD. (pkg): Call create_pkgadd after copying files. -2006-08-21 S�ren Hauberg <soren@hauberg.org> +2006-08-21 Søren Hauberg <soren@hauberg.org> * pkg/pkg.m: Handle multiple packages in a single file. Insert directory separator between OCTAVE_HOME and rest of package @@ -12229,7 +12229,7 @@ * audio/wavread.m: Fix calculation of sample count. -2006-08-14 S�ren Hauberg <soren@hauberg.org> +2006-08-14 Søren Hauberg <soren@hauberg.org> * image/imshow.m: New Matlab-compatible version. @@ -12246,7 +12246,7 @@ * sparse/spy.m, control/base/bode.m, control/base/__stepimp__.m, signal/freqz_plot.m: Adapt to new automatic_replot definition. -2006-08-14 S�ren Hauberg <soren@hauberg.org> +2006-08-14 Søren Hauberg <soren@hauberg.org> * pkg/pkg.m: Don't pass function name to print_usage. Use addpath and rmpath instead of manipulating LOADPATH. @@ -12377,7 +12377,7 @@ * tar.m, untar.m, unzip.m: Adapt to Octave coding style. * tar.m, untar.m: Only tar; don't compress or uncompress. -2006-05-10 S�ren Hauberg <hauberg@gmail.com> +2006-05-10 Søren Hauberg <hauberg@gmail.com> * tar.m, untar.m, unzip.m: New files. @@ -12594,7 +12594,7 @@ 2006-03-15 John W. Eaton <jwe@octave.org> * miscellaneous/doc.m: New file. - From S�ren Hauberg <soren@hauberg.org>. + From Søren Hauberg <soren@hauberg.org>. 2006-03-15 Keith Goodman <kwgoodman@gmail.com> @@ -13382,7 +13382,7 @@ * optimization/glpk.m, optimization/glpkparams.m, optimization/glpktest1, optimization/glpktest2: New files. -2005-03-16 S�ren Hauberg <soren@hauberg.org> +2005-03-16 Søren Hauberg <soren@hauberg.org> * strings/split.m: Quick return for empty second arg. Improve warning for multi-line strings.
--- a/etc/OLD-ChangeLogs/src-ChangeLog +++ b/etc/OLD-ChangeLogs/src-ChangeLog @@ -3027,7 +3027,7 @@ the "eng" argument. (Fformat): Document the new engineering format. -2010-07-04 Soren Hauberg <hauberg@gmail.com> +2010-07-04 Søren Hauberg <hauberg@gmail.com> * DLD_FUNCTIONS/__magick_read__.cc: restore locale after GraphicsMagick initialisation. @@ -4226,7 +4226,7 @@ * load-path.cc (in_path_list): New helper function. (add_to_fcn_map): Use it here. -2010-02-18 S�ren Hauberg <hauberg@gmail.com> +2010-02-18 Søren Hauberg <hauberg@gmail.com> * DLD-FUNCTIONS/__magick_read__.cc (__magick_finfo__): Handle multiple frames in a single image file. @@ -7564,7 +7564,7 @@ zooming methods. (help_text): Update to reflect new mouse/key bindings. -2009-07-23 Soren Hauberg <hauberg@gmail.com> +2009-07-23 Søren Hauberg <hauberg@gmail.com> * graphics.cc (axes::properties::zoom_about_point, axes::properties::translate_view): New functions. @@ -10246,12 +10246,12 @@ * DLD-FUNCTIONS/eigs.cc: eigs.cc: skip tests if ARPACK is missing. -2009-01-25 S�ren Hauberg <hauberg@gmail.com> +2009-01-25 Søren Hauberg <hauberg@gmail.com> * help.cc (do_get_help_text, raw_help_from_symbol_table): new output to flag the a function is found but not documented. -2009-01-25 S�ren Hauberg <hauberg@gmail.com> +2009-01-25 Søren Hauberg <hauberg@gmail.com> * help.cc (raw_help_from_file): No longer search for files called 'Contents.m', as this is moved to 'script/help.m'. @@ -10302,7 +10302,7 @@ * do_which (const std::string&): Call do_which (const std::string&, std::string&) to do the work. -2009-01-22 S�ren Hauberg <hauberg@gmail.com> +2009-01-22 Søren Hauberg <hauberg@gmail.com> * defun-int.h (print_usage): No longer mark as deprecated. * defun.cc (print_usage): Simply call feval to execute print_usage.m. @@ -10452,12 +10452,12 @@ * ov-struct.cc: Ditto. * pt-decl.h: Ditto. -2009-01-15 S�ren Hauberg <hauberg@gmail.com> +2009-01-15 Søren Hauberg <hauberg@gmail.com> * DLD-FUNCTIONS/__magick_read__.cc (encode_uint_image): Initialize bitdepth. -2009-01-14 S�ren Hauberg <hauberg@gmail.com> +2009-01-14 Søren Hauberg <hauberg@gmail.com> * DLD-FUNCTIONS/betainc.cc, DLD-FUNCTIONS/chol.cc, DLD-FUNCTIONS/daspk.cc, DLD-FUNCTIONS/dasrt.cc, @@ -11429,7 +11429,7 @@ * symtab.cc (symbol_table::do_find): Don't set evaluated_args and args_evaluated here, prior to call to symbol_table::fcn_info::find. -2008-09-24 S�ren Hauberg <hauberg@gmail.com> +2008-09-24 Søren Hauberg <hauberg@gmail.com> * DLD-FUNCTIONS/__magick_read__.cc (magick_to_octave_value): New template function with specializations for various @@ -11873,7 +11873,7 @@ Fix typo in warning identifier. (make_unimplemented_options): Use CamelCase names here. -2008-08-06 S�ren Hauberg <hauberg@gmail.com> +2008-08-06 Søren Hauberg <hauberg@gmail.com> * error.cc (Ferror): Update format of error messages in exmple. * parse.y: (Feval): Likewise. @@ -14465,7 +14465,7 @@ * DLD-FUNCTIONS/__convn__.cc (convn): Use traits class and typedefs to allow all types to be deduced from argument types. -2008-03-27 S�ren Hauberg <hauberg@gmail.com> +2008-03-27 Søren Hauberg <hauberg@gmail.com> * DLD-FUNCTIONS/__convn__.cc (Fconvn): Allow convolving real data with complex data. @@ -14515,7 +14515,7 @@ DLD-FUNCTIONS/qr.cc, DLD-FUNCTIONS/symrcm.cc, file-io.cc): Texinfo fixes. -2008-03-26 S�ren Hauberg <hauberg@gmail.com> +2008-03-26 Søren Hauberg <hauberg@gmail.com> * DLD-FUNCTIONS/__convn__.cc (Fconvn): Call complex_array_value to extract N-d array. @@ -14525,7 +14525,7 @@ * ov-base-sparse.cc (octave_base_sparse<T>::print_raw): Also display percentage of elements that are nonzero. -2008-03-25 S�ren Hauberg <hauberg@gmail.com> +2008-03-25 Søren Hauberg <hauberg@gmail.com> * DLD-FUNCTIONS/__convn__.cc: New file. * Makefile.in: Add __convn__.cc @@ -16805,7 +16805,7 @@ * DLD-FUNCTIONS/__qp__.cc (qp): Fix check for Wact(j). -2007-10-15 S�ren Hauberg <hauberg@gmail.com> +2007-10-15 Søren Hauberg <hauberg@gmail.com> * error.cc (Ferror): Make text fit on pages when using smallbook. * load-save.cc (Fsave_header_format_string): Ditto. @@ -17533,7 +17533,7 @@ (octave_stream_list::do_insert, octave_steam_list::insert): Remove const qualifier of argument. -2007-06-18 S�ren Hauberg <hauberg@gmail.com> +2007-06-18 Søren Hauberg <hauberg@gmail.com> * DLD-FUNCTIONS/__lin_interpn__.cc: Replace octave_NaN with octave_NA. @@ -17748,7 +17748,7 @@ arguments. (Fdbclar): ditto. Eliminate extraneous debugging messages. -2007-05-21 S�ren Hauberg <hauberg@gmail.com> +2007-05-21 Søren Hauberg <hauberg@gmail.com> * load-path.cc (Fpath, Frehash): Replace "LOADPATH" with "load path" in doc strings. @@ -17769,7 +17769,7 @@ (Octave_map::empty): Delete. Change all uses of empty to check nfields () == 0 instead. -2007-05-21 S�ren Hauberg <soren@hauberg.org> +2007-05-21 Søren Hauberg <soren@hauberg.org> * help.cc (Fautoload): Doc fix. * variables.cc (Fiscommand): Doc fix. @@ -17778,7 +17778,7 @@ * ov-fcn-inline.cc (Fvectorize): Doc fix. -2007-05-16 S�ren Hauberg <soren@hauberg.org> +2007-05-16 Søren Hauberg <soren@hauberg.org> * ov.cc (Fsubsref, Fsubsasgn): Doc fix. @@ -17846,14 +17846,14 @@ * DLD-FUNCTIONS/fft.cc (do_fft): Handle empty matrices. New tests. -2007-05-14 S�ren Hauberg <soren@hauberg.org> +2007-05-14 Søren Hauberg <soren@hauberg.org> * toplev.cc (Fatexit): Simplify example in doc string. * help.cc (Flookfor): Doc fix. * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Reformat to avoid long lines in doc string example. -2007-05-13 S�ren Hauberg <soren@hauberg.org> +2007-05-13 Søren Hauberg <soren@hauberg.org> * toplev.cc (Fquit): Doc fix. * help.cc (Fhelp): Doc fix. @@ -17934,7 +17934,7 @@ * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Only deal with varargout if ret_list->takes_varargs () is true. -2007-04-26 S�ren Hauberg <soren@hauberg.org> +2007-04-26 Søren Hauberg <soren@hauberg.org> * DLD-FUNCTIONS/urlwrite.cc: Doc fix. @@ -17963,7 +17963,7 @@ (color_property::validate): Use rgba. (color_property::c2rgba): New function. -2007-04-23 S�ren Hauberg <soren@hauberg.org> +2007-04-23 Søren Hauberg <soren@hauberg.org> * data.cc (Fsize_equal): Allow more than two arguments. @@ -19366,7 +19366,7 @@ New functions. * ov-base-int.h: Provide decls. -2006-09-15 S�ren Hauberg <soren@hauberg.org>. +2006-09-15 Søren Hauberg <soren@hauberg.org>. * data.cc (Fsize): If nargout > ndims, fill with 1. @@ -21472,7 +21472,7 @@ * help.cc (help_from_info): Simplify. (try_info): Use feval to call doc instead of executing info program. (additional_help_message): Point users to doc instead of help -i. - From S�ren Hauberg <soren@hauberg.org>. + From Søren Hauberg <soren@hauberg.org>. * toplev.cc (Fsystem): Return output if nargout > 1, not 0. @@ -22319,7 +22319,7 @@ 2005-07-18 John W. Eaton <jwe@octave.org> - * strfns.cc (Fstrcmp): New function from S�ren Hauberg + * strfns.cc (Fstrcmp): New function from Søren Hauberg <soren@hauberg.org> and Tom Holroyd <tomh@kurage.nimh.nih.gov>. Adapt to Octave conventions.
--- a/etc/OLD-ChangeLogs/test-ChangeLog +++ b/etc/OLD-ChangeLogs/test-ChangeLog @@ -285,7 +285,7 @@ * test_struct.m: Add struct array tests. -2009-01-23 Søren Hauberg <hauberg@gmail.com> +2009-01-23 Søren Hauberg <hauberg@gmail.com> * test_prefer.m: Update to match new API of the 'type' function.
--- a/examples/@FIRfilter/display.m +++ b/examples/@FIRfilter/display.m @@ -1,6 +1,6 @@ function display (f) - display(f.polynomial); + display (f.polynomial); endfunction
--- a/examples/@FIRfilter/subsref.m +++ b/examples/@FIRfilter/subsref.m @@ -2,7 +2,7 @@ switch x.type case "()" n = f.polynomial; - out = filter(n.poly, 1, x.subs{1}); + out = filter (n.poly, 1, x.subs{1}); case "." fld = x.subs; if (strcmp (fld, "polynomial"))
--- a/examples/@polynomial/display.m +++ b/examples/@polynomial/display.m @@ -1,7 +1,7 @@ function display (p) a = p.poly; first = true; - fprintf("%s =", inputname(1)); + fprintf ("%s =", inputname (1)); for i = 1 : length (a); if (a(i) != 0) if (first) @@ -26,7 +26,7 @@ endif endfor if (first) - fprintf(" 0"); + fprintf (" 0"); endif - fprintf("\n"); + fprintf ("\n"); endfunction
--- a/examples/@polynomial/mtimes.m +++ b/examples/@polynomial/mtimes.m @@ -1,3 +1,3 @@ function y = mtimes (a, b) - y = polynomial (conv (double(a),double(b))); -endfunction \ No newline at end of file + y = polynomial (conv (double (a), double (b))); +endfunction
--- a/examples/@polynomial/plot.m +++ b/examples/@polynomial/plot.m @@ -1,10 +1,10 @@ -function h = plot(p, varargin) +function h = plot (p, varargin) n = 128; rmax = max (abs (roots (p.poly))); x = [0 : (n - 1)] / (n - 1) * 2.2 * rmax - 1.1 * rmax; if (nargout > 0) - h = plot(x, p(x), varargin{:}); + h = plot (x, p(x), varargin{:}); else - plot(x, p(x), varargin{:}); + plot (x, p(x), varargin{:}); endif -endfunction \ No newline at end of file +endfunction
--- a/examples/@polynomial/polyval.m +++ b/examples/@polynomial/polyval.m @@ -1,7 +1,7 @@ function [y, dy] = polyval (p, varargin) if (nargout == 2) - [y, dy] = polyval (fliplr(p.poly), varargin{:}); + [y, dy] = polyval (fliplr (p.poly), varargin{:}); else - y = polyval (fliplr(p.poly), varargin{:}); + y = polyval (fliplr (p.poly), varargin{:}); endif endfunction
--- a/examples/myprop.c +++ b/examples/myprop.c @@ -8,7 +8,7 @@ if (nrhs < 2 || nrhs > 3) mexErrMsgTxt ("incorrect number of arguments"); - if (!mxIsDouble(prhs[0])) + if (!mxIsDouble (prhs[0])) mexErrMsgTxt ("handle expected to be a double scalar"); if (!mxIsChar (prhs[1])) mexErrMsgTxt ("expected property to be a string");
--- a/examples/stringdemo.cc +++ b/examples/stringdemo.cc @@ -22,7 +22,7 @@ for (octave_idx_type i = 0; i < nr / 2; i++) { std::string tmp = ch.row_as_string (i); - ch.insert (ch.row_as_string(nr-i-1).c_str (), + ch.insert (ch.row_as_string (nr-i-1).c_str (), i, 0); ch.insert (tmp.c_str (), nr-i-1, 0); }
--- a/examples/unwinddemo.cc +++ b/examples/unwinddemo.cc @@ -22,7 +22,7 @@ { unwind_protect::begin_frame ("Funwinddemo"); unwind_protect_ptr (current_liboctave_warning_handler); - set_liboctave_warning_handler(err_hand); + set_liboctave_warning_handler (err_hand); retval = octave_value (quotient (a, b)); unwind_protect::run_frame ("Funwinddemo"); }
--- a/scripts/io/strread.m +++ b/scripts/io/strread.m @@ -168,7 +168,7 @@ ## ## @end table ## -# @seealso{textscan, textread, load, dlmread, fscanf} +## @seealso{textscan, textread, load, dlmread, fscanf} ## @end deftypefn function varargout = strread (str, format = "%f", varargin)
--- a/scripts/io/textscan.m +++ b/scripts/io/textscan.m @@ -26,8 +26,8 @@ ## Read data from a text file or string. ## ## The string @var{str} or file associated with @var{fid} is read from and -## parsed according to @var{format}. The function behaves like @code{strread} -## except it can also read from file instead of a string. See the documentation +## parsed according to @var{format}. The function behaves like @code{strread} +## except it can also read from file instead of a string. See the documentation ## of @code{strread} for details. ## ## In addition to the options supported by @code{strread}, this function
--- a/scripts/pkg/pkg.m +++ b/scripts/pkg/pkg.m @@ -421,6 +421,16 @@ global_packages = archprefix; elseif (length (files) >= 1 && nargout <= 2 && ischar (files{1})) prefix = files{1}; + try + prefix = absolute_pathname (prefix); + catch + [status, msg, msgid] = mkdir (prefix); + if (status == 0) + error("cannot create prefix %s: %s", prefix, msg); + endif + warning ("creating the directory %s\n", prefix); + prefix = absolute_pathname (prefix); + end_try_catch prefix = absolute_pathname (prefix); local_packages = prefix; user_prefix = true; @@ -429,7 +439,10 @@ try archprefix = absolute_pathname (archprefix); catch - mkdir (archprefix); + [status, msg, msgid] = mkdir (archprefix); + if (status == 0) + error("cannot create archprefix %s: %s", archprefix, msg); + endif warning ("creating the directory %s\n", archprefix); archprefix = absolute_pathname (archprefix); end_try_catch
--- a/scripts/plot/graphics_toolkit.m +++ b/scripts/plot/graphics_toolkit.m @@ -17,17 +17,17 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {@var{name} =} graphics_toolkit () -## Returns the default graphics toolkit. The default graphics toolkit value +## @deftypefn {Function File} {@var{name} =} graphics_toolkit () +## Return the default graphics toolkit. The default graphics toolkit value ## is assigned to new figures. ## @deftypefnx {Function File} {@var{name} =} graphics_toolkit (@var{hlist}) -## Returns the graphics toolkits for the figures with handles @var{hlist}. +## Return the graphics toolkits for the figures with handles @var{hlist}. ## @deftypefnx {Function File} {} graphics_toolkit (@var{name}) -## Sets the default graphics toolkit to @var{name}. If the toolkit is not +## Set the default graphics toolkit to @var{name}. If the toolkit is not ## already loaded, it is initialized by calling the function ## @code{__init_@var{name}__}. ## @deftypefnx {Function File} {} graphics_toolkit (@var{hlist}, @var{name}) -## Sets the graphics toolkit for the figues with handles @var{hlist} to +## Set the graphics toolkit for the figures with handles @var{hlist} to ## @var{name}. ## @seealso{available_graphics_toolkits} ## @end deftypefn
--- a/scripts/plot/print.m +++ b/scripts/plot/print.m @@ -77,9 +77,9 @@ ## @item -TextAlphaBits=@var{n} ## @itemx -GraphicsAlphaBits=@var{n} ## Octave is able to produce output for various printers, bitmaps, and -## vector formats by using ghostscript. -## For bitmap and printer output antialiasing is applied using -## ghostscript's TextAlphaBits and GraphicsAlphaBits options. +## vector formats by using Ghostscript. +## For bitmap and printer output anti-aliasing is applied using +## Ghostscript's TextAlphaBits and GraphicsAlphaBits options. ## The default number of bits for each is 4. ## Allowed values, for @var{N}, are 1, 2, or 4. ##
--- a/scripts/sparse/bicg.m +++ b/scripts/sparse/bicg.m @@ -46,6 +46,7 @@ ## ## @itemize @minus ## @item @var{flag} indicates the exit status: +## ## @itemize @minus ## @item 0: iteration converged to the within the chosen tolerance ##
--- a/scripts/sparse/bicgstab.m +++ b/scripts/sparse/bicgstab.m @@ -48,6 +48,7 @@ ## ## @itemize @minus ## @item @var{flag} indicates the exit status: +## ## @itemize @minus ## @item 0: iteration converged to the within the chosen tolerance ##
--- a/scripts/sparse/cgs.m +++ b/scripts/sparse/cgs.m @@ -48,6 +48,7 @@ ## ## @itemize @minus ## @item @var{flag} indicates the exit status: +## ## @itemize @minus ## @item 0: iteration converged to the within the chosen tolerance ##
--- a/scripts/time/datevec.m +++ b/scripts/time/datevec.m @@ -31,7 +31,7 @@ ## @var{f} is the format string used to interpret date strings ## (see @code{datestr}). If @var{date} is a string, but no format is ## specified, then a relatively slow search is performed through various -## formats. It is always preferable to specifiy the format string @var{f} +## formats. It is always preferable to specify the format string @var{f} ## if it is known. Formats which do not specify a particular time component ## will have the value set to zero. Formats which do not specify a date will ## default to January 1st of the current year.
--- a/src/DLD-FUNCTIONS/__fltk_uigetfile__.cc +++ b/src/DLD-FUNCTIONS/__fltk_uigetfile__.cc @@ -109,7 +109,7 @@ } else { - Cell file_cell = Cell(file_count, 1); + Cell file_cell = Cell (file_count, 1); for (octave_idx_type n = 1; n <= file_count; n++) { fname = fc.value (n);
--- a/src/DLD-FUNCTIONS/__glpk__.cc +++ b/src/DLD-FUNCTIONS/__glpk__.cc @@ -282,7 +282,7 @@ } //-- scale the problem data (if required) - //-- if (scale && (!presol || method == 1)) lpx_scale_prob(lp); + //-- if (scale && (!presol || method == 1)) lpx_scale_prob (lp); //-- LPX_K_SCALE=IParam[1] LPX_K_PRESOL=IParam[16] if (lpxIntParam[1] && (! lpxIntParam[16] || lpsolver != 1)) lpx_scale_prob (lp); @@ -291,7 +291,7 @@ if (lpsolver == 1 && ! lpxIntParam[16]) lpx_adv_basis (lp); - for(int i = 0; i < NIntP; i++) + for (int i = 0; i < NIntP; i++) lpx_set_int_parm (lp, IParam[i], lpxIntParam[i]); for (int i = 0; i < NRealP; i++) @@ -313,12 +313,12 @@ errnum = lpx_integer (lp); } else - errnum = lpx_simplex(lp); + errnum = lpx_simplex (lp); } break; case 'T': - errnum = lpx_interior(lp); + errnum = lpx_interior (lp); break; default: @@ -531,10 +531,10 @@ } for (octave_idx_type j = 0; j < Anc; j++) - for (octave_idx_type i = A.cidx(j); i < A.cidx(j+1); i++) + for (octave_idx_type i = A.cidx (j); i < A.cidx (j+1); i++) { nz++; - rn(nz) = A.ridx(i) + 1; + rn(nz) = A.ridx (i) + 1; cn(nz) = j + 1; a(nz) = A.data(i); }
--- a/src/DLD-FUNCTIONS/__init_fltk__.cc +++ b/src/DLD-FUNCTIONS/__init_fltk__.cc @@ -257,7 +257,7 @@ // Parameter controlling the GUI mode. static enum { pan_zoom, rotate_zoom, none } gui_mode; -void script_cb(Fl_Widget*, void* data) +void script_cb (Fl_Widget*, void* data) { static_cast<uimenu::properties*> (data)->execute_callback (); } @@ -269,7 +269,7 @@ fltk_uimenu (int xx, int yy, int ww, int hh) { menubar = new - Fl_Menu_Bar(xx, yy, ww, hh); + Fl_Menu_Bar (xx, yy, ww, hh); } int items_to_show (void) @@ -685,7 +685,7 @@ uimenu->hide (); bottom = new Fl_Box (0, hh - status_h, ww, status_h); - bottom->box(FL_FLAT_BOX); + bottom->box (FL_FLAT_BOX); ndim = calc_dimensions (gh_manager::get_object (fp.get___myhandle__ ())); @@ -1924,8 +1924,8 @@ if (id == uimenu::properties::ID_LABEL) uimenu_set_fltk_label (go); - graphics_object fig = go.get_ancestor("figure"); - figure_manager::uimenu_update(fig.get_handle (), go.get_handle (), id); + graphics_object fig = go.get_ancestor ("figure"); + figure_manager::uimenu_update (fig.get_handle (), go.get_handle (), id); } }
--- a/src/DLD-FUNCTIONS/__magick_read__.cc +++ b/src/DLD-FUNCTIONS/__magick_read__.cc @@ -403,9 +403,9 @@ DEFUN_DLD (__magick_read__, args, nargout, "-*- texinfo -*-\n\ -@deftypefn {Function File} {@var{m} =} __magick_read__(@var{fname}, @var{index})\n\ -@deftypefnx {Function File} {[@var{m}, @var{colormap}] =} __magick_read__(@var{fname}, @var{index})\n\ -@deftypefnx {Function File} {[@var{m}, @var{colormap}, @var{alpha}] =} __magick_read__(@var{fname}, @var{index})\n\ +@deftypefn {Function File} {@var{m} =} __magick_read__ (@var{fname}, @var{index})\n\ +@deftypefnx {Function File} {[@var{m}, @var{colormap}] =} __magick_read__ (@var{fname}, @var{index})\n\ +@deftypefnx {Function File} {[@var{m}, @var{colormap}, @var{alpha}] =} __magick_read__ (@var{fname}, @var{index})\n\ Read images with ImageMagick++. In general you should not be using this\n\ function. Instead use @code{imread}.\n\ @seealso{imread}\n\ @@ -604,7 +604,7 @@ for (unsigned int ii = 0; ii < nframes; ii++) { - Magick::Image im(Magick::Geometry (columns, rows), "black"); + Magick::Image im (Magick::Geometry (columns, rows), "black"); im.classType (Magick::DirectClass); im.depth (1); @@ -871,8 +871,8 @@ DEFUN_DLD (__magick_write__, args, , "-*- texinfo -*-\n\ -@deftypefn {Function File} {} __magick_write__(@var{fname}, @var{fmt}, @var{img})\n\ -@deftypefnx {Function File} {} __magick_write__(@var{fname}, @var{fmt}, @var{img}, @var{map})\n\ +@deftypefn {Function File} {} __magick_write__ (@var{fname}, @var{fmt}, @var{img})\n\ +@deftypefnx {Function File} {} __magick_write__ (@var{fname}, @var{fmt}, @var{img}, @var{map})\n\ Write images with ImageMagick++. In general you should not be using this\n\ function. Instead use @code{imwrite}.\n\ @seealso{imread}\n\ @@ -1007,7 +1007,7 @@ DEFUN_DLD (__magick_finfo__, args, , "-*- texinfo -*-\n\ -@deftypefn {Loadable Function} {} __magick_finfo__(@var{fname})\n\ +@deftypefn {Loadable Function} {} __magick_finfo__ (@var{fname})\n\ Read image information with GraphicsMagick++. In general you should\n\ not be using this function. Instead use @code{imfinfo}.\n\ @seealso{imfinfo, imread}\n\
--- a/src/DLD-FUNCTIONS/besselj.cc +++ b/src/DLD-FUNCTIONS/besselj.cc @@ -388,21 +388,21 @@ @table @code\n\ @item besselj\n\ Bessel functions of the first kind. If the argument @var{opt} is supplied,\n\ -the result is multiplied by @code{exp(-abs(imag(@var{x})))}.\n\ +the result is multiplied by @code{exp (-abs (imag (@var{x})))}.\n\ \n\ @item bessely\n\ Bessel functions of the second kind. If the argument @var{opt} is supplied,\n\ -the result is multiplied by @code{exp(-abs(imag(@var{x})))}.\n\ +the result is multiplied by @code{exp (-abs (imag (@var{x})))}.\n\ \n\ @item besseli\n\ \n\ Modified Bessel functions of the first kind. If the argument @var{opt} is\n\ -supplied, the result is multiplied by @code{exp(-abs(real(@var{x})))}.\n\ +supplied, the result is multiplied by @code{exp (-abs (real (@var{x})))}.\n\ \n\ @item besselk\n\ \n\ Modified Bessel functions of the second kind. If the argument @var{opt} is\n\ -supplied, the result is multiplied by @code{exp(@var{x})}.\n\ +supplied, the result is multiplied by @code{exp (@var{x})}.\n\ \n\ @item besselh\n\ Compute Hankel functions of the first (@var{k} = 1) or second (@var{k}\n\ @@ -533,8 +533,8 @@ --- -------- ---------------------------------------\n\ 0 Ai (Z) exp ((2/3) * Z * sqrt (Z))\n\ 1 dAi(Z)/dZ exp ((2/3) * Z * sqrt (Z))\n\ - 2 Bi (Z) exp (-abs (real ((2/3) * Z *sqrt (Z))))\n\ - 3 dBi(Z)/dZ exp (-abs (real ((2/3) * Z *sqrt (Z))))\n\ + 2 Bi (Z) exp (-abs (real ((2/3) * Z * sqrt (Z))))\n\ + 3 dBi(Z)/dZ exp (-abs (real ((2/3) * Z * sqrt (Z))))\n\ @end group\n\ @end example\n\ \n\ @@ -1073,8 +1073,8 @@ %! [ 0.0897803119 0.0875062222 0.081029690 0.2785448768 0.2854254970 0.30708743 ]]; %! %! tbl = [besseli(n,z1,1), besselk(n,z1,1)]; -%! tbl(:,3) = tbl(:,3) .* (exp(z1).*z1.^(-2)); -%! tbl(:,6) = tbl(:,6) .* (exp(-z1).*z1.^(2)); +%! tbl(:,3) = tbl(:,3) .* (exp (z1) .* z1.^(-2)); +%! tbl(:,6) = tbl(:,6) .* (exp (-z1) .* z1.^(2)); %! tbl = [tbl;[besseli(n,z2,1),besselk(n,z2,1)]]; %! %! assert (tbl, rtbl, -2e-8); @@ -1111,7 +1111,7 @@ %! I = besseli (n,z,1); %! K = besselk (n,z,1); %! -%! assert (abs (I(1,:)), zeros (1, columns(I))); +%! assert (abs (I(1,:)), zeros (1, columns (I))); %! assert (I(2:end,:), It(2:end,:), -5e-5); %! assert (Kt(1,:), K(1,:)); %! assert (K(2:end,:), Kt(2:end,:), -5e-5); @@ -1154,7 +1154,7 @@ %! assert (besselj (n,1), besselj (-n,1), 1e-8); %! assert (-besselj (n+1,1), besselj (-n-1,1), 1e-8); -besseli(n,z) = besseli(-n,z); +besseli (n,z) = besseli (-n,z); %!test %! n = (0:2:20); @@ -1179,22 +1179,22 @@ %! [ -4.6218e-02 -1.3123e-01 -6.2736e-03 ]; %! [ 8.3907e-02 6.2793e-02 -6.5069e-02 ]]; %! -%! j = sqrt((pi/2)./z).*besselj(n+1/2,z); -%! y = sqrt((pi/2)./z).*bessely(n+1/2,z); -%! assert(jt, j, -5e-5); -%! assert(yt, y, -5e-5); +%! j = sqrt ((pi/2)./z) .* besselj (n+1/2,z); +%! y = sqrt ((pi/2)./z) .* bessely (n+1/2,z); +%! assert (jt, j, -5e-5); +%! assert (yt, y, -5e-5); Table 10.2 - j and y for orders 3-8. Compare against excerpts of Table 10.2, Abramowitzh and Stegun. Important note: In A&S, y_4(0.1) = -1.0507e+7, but Octave returns - y_4(0.1) = -1.0508e+07 (-10507503.75). If I compute the same term using + y_4(0.1) = -1.0508e+07 (-10507503.75). If I compute the same term using a series, the difference is in the eighth significant digit so I left the Octave results in place. %!test %! n = (3:8); -%! z = (0:2.5:10).'; z(1)=0.1; +%! z = (0:2.5:10).'; z(1) = 0.1; %! %! jt = [[ 9.5185e-06 1.0577e-07 9.6163e-10 7.3975e-12 4.9319e-14 2.9012e-16]; %! [ 1.0392e-01 3.0911e-02 7.3576e-03 1.4630e-03 2.5009e-04 3.7516e-05];
--- a/src/DLD-FUNCTIONS/bsxfun.cc +++ b/src/DLD-FUNCTIONS/bsxfun.cc @@ -233,9 +233,9 @@ for (octave_idx_type j = 1; j < nd; j++) { if (dva (j) == 1) - idx (j) = octave_value (1); + idx(j) = octave_value (1); else - idx (j) = octave_value ((i % dvc(j)) + 1); + idx(j) = octave_value ((i % dvc(j)) + 1); i = i / dvc (j); } @@ -785,8 +785,8 @@ %! y = rand (3,1) * 10-5; %! %! for i=1:length (funs) -%! for j = 1:length(float_types) -%! for k = 1:length(int_types) +%! for j = 1:length (float_types) +%! for k = 1:length (int_types) %! %! fun = funs{i}; %! f_type = float_types{j};
--- a/src/DLD-FUNCTIONS/ccolamd.cc +++ b/src/DLD-FUNCTIONS/ccolamd.cc @@ -103,7 +103,7 @@ range 1 to\n\ n). In the output permutation @var{p}, all columns in set 1 appear\n\ first, followed by all columns in set 2, and so on. @code{@var{cmember} =\n\ -ones(1,n)} if not present or empty.\n\ +ones (1,n)} if not present or empty.\n\ @code{ccolamd (@var{S}, [], 1 : n)} returns @code{1 : n}\n\ \n\ @code{@var{p} = ccolamd (@var{S})} is about the same as\n\ @@ -181,14 +181,14 @@ << CCOLAMD_SUB_VERSION << ", " << CCOLAMD_DATE << ":\nknobs(1): " << User_knobs (0) << ", order for "; if ( knobs [CCOLAMD_LU] != 0) - octave_stdout << "lu(A)\n"; + octave_stdout << "lu (A)\n"; else - octave_stdout << "chol(A'*A)\n"; + octave_stdout << "chol (A'*A)\n"; if (knobs [CCOLAMD_DENSE_ROW] >= 0) octave_stdout << "knobs(2): " << User_knobs (1) - << ", rows with > max(16," - << knobs [CCOLAMD_DENSE_ROW] << "*sqrt(size(A,2)))" + << ", rows with > max (16," + << knobs [CCOLAMD_DENSE_ROW] << "*sqrt (size(A,2)))" << " entries removed\n"; else octave_stdout << "knobs(2): " << User_knobs (1) @@ -196,8 +196,8 @@ if (knobs [CCOLAMD_DENSE_COL] >= 0) octave_stdout << "knobs(3): " << User_knobs (2) - << ", cols with > max(16," - << knobs [CCOLAMD_DENSE_COL] << "*sqrt(size(A)))" + << ", cols with > max (16," + << knobs [CCOLAMD_DENSE_COL] << "*sqrt (size(A)))" << " entries removed\n"; else octave_stdout << "knobs(3): " << User_knobs (2) @@ -302,7 +302,7 @@ // return the permutation vector NDArray out_perm (dim_vector (1, n_col)); for (octave_idx_type i = 0; i < n_col; i++) - out_perm(i) = p [i] + 1; + out_perm(i) = p[i] + 1; retval(0) = out_perm; @@ -372,11 +372,11 @@ on the ordering. If @code{@var{cmember}(j) = @var{S}}, then row/column j is\n\ in constraint set @var{c} (@var{c} must be in the range 1 to n). In the\n\ output permutation @var{p}, rows/columns in set 1 appear first, followed\n\ -by all rows/columns in set 2, and so on. @code{@var{cmember} = ones(1,n)}\n\ -if not present or empty. @code{csymamd(@var{S},[],1:n)} returns @code{1:n}.\n\ +by all rows/columns in set 2, and so on. @code{@var{cmember} = ones (1,n)}\n\ +if not present or empty. @code{csymamd (@var{S},[],1:n)} returns @code{1:n}.\n\ \n\ -@code{@var{p} = csymamd(@var{S})} is about the same as @code{@var{p} =\n\ -symamd(@var{S})}. @var{knobs} and its default values differ.\n\ +@code{@var{p} = csymamd (@var{S})} is about the same as @code{@var{p} =\n\ +symamd (@var{S})}. @var{knobs} and its default values differ.\n\ \n\ @code{@var{stats}(4:7)} provide information if CCOLAMD was able to\n\ continue. The matrix is OK if @code{@var{stats}(4)} is zero, or 1 if\n\ @@ -433,8 +433,8 @@ if (knobs [CCOLAMD_DENSE_ROW] >= 0) octave_stdout << "knobs(1): " << User_knobs (0) - << ", rows/cols with > max(16," - << knobs [CCOLAMD_DENSE_ROW] << "*sqrt(size(A,2)))" + << ", rows/cols with > max (16," + << knobs [CCOLAMD_DENSE_ROW] << "*sqrt (size(A,2)))" << " entries removed\n"; else octave_stdout << "knobs(1): " << User_knobs (0) @@ -534,7 +534,7 @@ // return the permutation vector NDArray out_perm (dim_vector (1, n_col)); for (octave_idx_type i = 0; i < n_col; i++) - out_perm(i) = perm [i] + 1; + out_perm(i) = perm[i] + 1; retval(0) = out_perm;
--- a/src/DLD-FUNCTIONS/cellfun.cc +++ b/src/DLD-FUNCTIONS/cellfun.cc @@ -116,42 +116,42 @@ { boolNDArray result (f_args.dims ()); for (octave_idx_type count = 0; count < k; count++) - result(count) = f_args.elem(count).is_empty (); + result(count) = f_args.elem (count).is_empty (); retval(0) = result; } else if (name == "islogical") { boolNDArray result (f_args.dims ()); for (octave_idx_type count= 0; count < k; count++) - result(count) = f_args.elem(count).is_bool_type (); + result(count) = f_args.elem (count).is_bool_type (); retval(0) = result; } else if (name == "isreal") { boolNDArray result (f_args.dims ()); for (octave_idx_type count= 0; count < k; count++) - result(count) = f_args.elem(count).is_real_type (); + result(count) = f_args.elem (count).is_real_type (); retval(0) = result; } else if (name == "length") { NDArray result (f_args.dims ()); for (octave_idx_type count= 0; count < k; count++) - result(count) = static_cast<double> (f_args.elem(count).length ()); + result(count) = static_cast<double> (f_args.elem (count).length ()); retval(0) = result; } else if (name == "ndims") { NDArray result (f_args.dims ()); for (octave_idx_type count = 0; count < k; count++) - result(count) = static_cast<double> (f_args.elem(count).ndims ()); + result(count) = static_cast<double> (f_args.elem (count).ndims ()); retval(0) = result; } else if (name == "prodofsize" || name == "numel") { NDArray result (f_args.dims ()); for (octave_idx_type count = 0; count < k; count++) - result(count) = static_cast<double> (f_args.elem(count).numel ()); + result(count) = static_cast<double> (f_args.elem (count).numel ()); retval(0) = result; } else if (name == "size") @@ -168,7 +168,7 @@ NDArray result (f_args.dims ()); for (octave_idx_type count = 0; count < k; count++) { - dim_vector dv = f_args.elem(count).dims (); + dim_vector dv = f_args.elem (count).dims (); if (d < dv.length ()) result(count) = static_cast<double> (dv(d)); else @@ -187,7 +187,7 @@ std::string class_name = args(2).string_value (); boolNDArray result (f_args.dims ()); for (octave_idx_type count = 0; count < k; count++) - result(count) = (f_args.elem(count).class_name () == class_name); + result(count) = (f_args.elem (count).class_name () == class_name); retval(0) = result; } @@ -317,7 +317,7 @@ a = x;\n\ b = x*x;\n\ endfunction\n\ -[aa, bb] = cellfun(@@twoouts, @{1, 2, 3@})\n\ +[aa, bb] = cellfun (@@twoouts, @{1, 2, 3@})\n\ @result{}\n\ aa =\n\ 1 2 3\n\ @@ -375,7 +375,7 @@ @example\n\ @group\n\ a = @{@dots{}@}\n\ -v = cellfun (@@(x) det(x), a); # compute determinants\n\ +v = cellfun (@@(x) det (x), a); # compute determinants\n\ v = cellfun (@@det, a); # faster\n\ @end group\n\ @end example\n\ @@ -767,7 +767,7 @@ %! A = cellfun (@islogical, {true, 0.1, false, i*2}); %! assert (A, [true, false, true, false]); %!test -%! A = cellfun (@(x) islogical(x), {true, 0.1, false, i*2}); +%! A = cellfun (@(x) islogical (x), {true, 0.1, false, i*2}); %! assert (A, [true, false, true, false]); %% First input argument can be the special string "isreal", @@ -864,7 +864,7 @@ %! assert (isequal (B, {true, true; [], true})); %! assert (isequal (C, {10, 11; [], 12})); %!test -%! A = cellfun (@(x,y) cell2str(x,y), {1.1, 4}, {3.1, 6}, \ +%! A = cellfun (@(x,y) cell2str (x,y), {1.1, 4}, {3.1, 6}, \ %! "ErrorHandler", @__cellfunerror); %! B = isfield (A(1), "message") && isfield (A(1), "index"); %! assert ([(isfield (A(1), "identifier")), (isfield (A(2), "identifier"))], [true, true]); @@ -873,7 +873,7 @@ %! assert ([(isempty (A(1).message)), (isempty (A(2).message))], [false, false]); %! assert ([A(1).index, A(2).index], [1, 2]); %!test %% Overwriting setting of "UniformOutput" true -%! A = cellfun (@(x,y) cell2str(x,y), {1.1, 4}, {3.1, 6}, \ +%! A = cellfun (@(x,y) cell2str (x,y), {1.1, 4}, {3.1, 6}, \ %! "UniformOutput", true, "ErrorHandler", @__cellfunerror); %! B = isfield (A(1), "message") && isfield (A(1), "index"); %! assert ([(isfield (A(1), "identifier")), (isfield (A(2), "identifier"))], [true, true]); @@ -892,7 +892,7 @@ %! A = cellfun (@(x,y) x:y, {"a", "d"}, {"c", "f"}, "UniformOutput", false); %! assert (A, {"abc", "def"}); %!test -%! A = cellfun (@(x,y) cell2str(x,y), {"a", "d"}, {"c", "f"}, \ +%! A = cellfun (@(x,y) cell2str (x,y), {"a", "d"}, {"c", "f"}, \ %! "ErrorHandler", @__cellfunerror); %! assert ([(isfield (A(1), "identifier")), (isfield (A(2), "identifier"))], [true, true]); %! assert ([(isfield (A(1), "message")), (isfield (A(2), "message"))], [true, true]); @@ -900,7 +900,7 @@ %! assert ([(isempty (A(1).message)), (isempty (A(2).message))], [false, false]); %! assert ([A(1).index, A(2).index], [1, 2]); %!test %% Overwriting setting of "UniformOutput" true -%! A = cellfun (@(x,y) cell2str(x,y), {"a", "d"}, {"c", "f"}, \ +%! A = cellfun (@(x,y) cell2str (x,y), {"a", "d"}, {"c", "f"}, \ %! "UniformOutput", true, "ErrorHandler", @__cellfunerror); %! assert ([(isfield (A(1), "identifier")), (isfield (A(2), "identifier"))], [true, true]); %! assert ([(isfield (A(1), "message")), (isfield (A(2), "message"))], [true, true]); @@ -926,7 +926,7 @@ %! "UniformOutput", false); %! assert (A, {true, false}); %!test -%! A = cellfun (@(x,y) mat2str(x,y), {{1.1}, {4.2}}, {{3.1}, {2}}, \ +%! A = cellfun (@(x,y) mat2str (x,y), {{1.1}, {4.2}}, {{3.1}, {2}}, \ %! "ErrorHandler", @__cellfunerror); %! assert ([(isfield (A(1), "identifier")), (isfield (A(2), "identifier"))], [true, true]); %! assert ([(isfield (A(1), "message")), (isfield (A(2), "message"))], [true, true]); @@ -934,7 +934,7 @@ %! assert ([(isempty (A(1).message)), (isempty (A(2).message))], [false, false]); %! assert ([A(1).index, A(2).index], [1, 2]); %!test %% Overwriting setting of "UniformOutput" true -%! A = cellfun (@(x,y) mat2str(x,y), {{1.1}, {4.2}}, {{3.1}, {2}}, \ +%! A = cellfun (@(x,y) mat2str (x,y), {{1.1}, {4.2}}, {{3.1}, {2}}, \ %! "UniformOutput", true, "ErrorHandler", @__cellfunerror); %! assert ([(isfield (A(1), "identifier")), (isfield (A(2), "identifier"))], [true, true]); %! assert ([(isfield (A(1), "message")), (isfield (A(2), "message"))], [true, true]); @@ -1489,7 +1489,7 @@ %! A = arrayfun (@isequal, [false, true], [true, true]); %! assert (A, [false, true]); %!test -%! A = arrayfun (@(x,y) isequal(x,y), [false, true], [true, true]); +%! A = arrayfun (@(x,y) isequal (x,y), [false, true], [true, true]); %! assert (A, [false, true]); %% Number of input and output arguments may be greater than one @@ -1561,7 +1561,7 @@ %! assert (isequal (B, {true, true; [], true})); %! assert (isequal (C, {10, 11; [], 12})); %!test -%! A = arrayfun (@(x,y) array2str(x,y), {1.1, 4}, {3.1, 6}, \ +%! A = arrayfun (@(x,y) array2str (x,y), {1.1, 4}, {3.1, 6}, \ %! "ErrorHandler", @__arrayfunerror); %! B = isfield (A(1), "message") && isfield (A(1), "index"); %! assert ([(isfield (A(1), "identifier")), (isfield (A(2), "identifier"))], [true, true]); @@ -1570,7 +1570,7 @@ %! assert ([(isempty (A(1).message)), (isempty (A(2).message))], [false, false]); %! assert ([A(1).index, A(2).index], [1, 2]); %!test %% Overwriting setting of "UniformOutput" true -%! A = arrayfun (@(x,y) array2str(x,y), {1.1, 4}, {3.1, 6}, \ +%! A = arrayfun (@(x,y) array2str (x,y), {1.1, 4}, {3.1, 6}, \ %! "UniformOutput", true, "ErrorHandler", @__arrayfunerror); %! B = isfield (A(1), "message") && isfield (A(1), "index"); %! assert ([(isfield (A(1), "identifier")), (isfield (A(2), "identifier"))], [true, true]); @@ -1590,7 +1590,7 @@ %! A = arrayfun (@(x,y) x:y, ["a", "d"], ["c", "f"], "UniformOutput", false); %! assert (A, {"abc", "def"}); %!test -%! A = arrayfun (@(x,y) cell2str(x,y), ["a", "d"], ["c", "f"], \ +%! A = arrayfun (@(x,y) cell2str (x,y), ["a", "d"], ["c", "f"], \ %! "ErrorHandler", @__arrayfunerror); %! B = isfield (A(1), "identifier") && isfield (A(1), "message") && isfield (A(1), "index"); %! assert (B, true); @@ -1642,7 +1642,7 @@ %! assert ([(isempty (A(1).message)), (isempty (A(2).message))], [false, false]); %! assert ([A(1).index, A(2).index], [1, 2]); %!test -%! A = arrayfun (@(x,y) num2str(x,y), {1.1, 4.2}, {3.1, 2}, \ +%! A = arrayfun (@(x,y) num2str (x,y), {1.1, 4.2}, {3.1, 2}, \ %! "UniformOutput", true, "ErrorHandler", @__arrayfunerror); %! assert ([(isfield (A(1), "identifier")), (isfield (A(2), "identifier"))], [true, true]); %! assert ([(isfield (A(1), "message")), (isfield (A(2), "message"))], [true, true]); @@ -1790,7 +1790,7 @@ idx(0) = double (i+1); - retval.xelem(i) = array.single_subsref ("(", idx); + retval.xelem (i) = array.single_subsref ("(", idx); if (error_state) break;
--- a/src/DLD-FUNCTIONS/chol.cc +++ b/src/DLD-FUNCTIONS/chol.cc @@ -372,11 +372,11 @@ /* %!assert (chol ([2, 1; 1, 1]), [sqrt(2), 1/sqrt(2); 0, 1/sqrt(2)], sqrt (eps)) -%!assert (chol (single([2, 1; 1, 1])), single([sqrt(2), 1/sqrt(2); 0, 1/sqrt(2)]), sqrt (eps ("single"))) +%!assert (chol (single ([2, 1; 1, 1])), single ([sqrt(2), 1/sqrt(2); 0, 1/sqrt(2)]), sqrt (eps ("single"))) +%!error chol () %!error <matrix must be positive definite> chol ([1, 2; 3, 4]) %!error <requires square matrix> chol ([1, 2; 3, 4; 5, 6]) -%!error chol () %!error <unexpected second or third input> chol (1, 2) */ @@ -989,7 +989,7 @@ %! -0.13825 ; %! 0.45266 ]); %! -%! R = chol(single(A)); +%! R = chol (single (A)); %! %! j = 3; p = [1:j-1, j+1:5]; %! R1 = cholinsert (R, j, u2); @@ -1183,7 +1183,7 @@ /* %!test -%! R = chol(A); +%! R = chol (A); %! %! j = 3; p = [1:j-1,j+1:4]; %! R1 = choldelete (R, j); @@ -1210,10 +1210,10 @@ %! assert (norm (R1'*R1 - single (A(p,p)), Inf) < 1e1*eps ("single")); %!test -%! R = chol(single(Ac)); +%! R = chol (single (Ac)); %! %! j = 3; p = [1:j-1,j+1:4]; -%! R1 = choldelete(R,j); +%! R1 = choldelete (R,j); %! %! assert (norm (triu (R1)-R1, Inf), single (0)); %! assert (norm (R1'*R1 - single (Ac(p,p)), Inf) < 1e1*eps ("single")); @@ -1335,8 +1335,8 @@ %! j = 1; i = 3; p = [1:j-1, shift(j:i,+1), i+1:4]; %! R1 = cholshift (R, i, j); %! -%! assert (norm(triu(R1)-R1, Inf), 0); -%! assert (norm(R1'*R1 - A(p,p), Inf) < 1e1*eps); +%! assert (norm (triu (R1) - R1, Inf), 0); +%! assert (norm (R1'*R1 - A(p,p), Inf) < 1e1*eps); %!test %! R = chol (Ac);
--- a/src/DLD-FUNCTIONS/colamd.cc +++ b/src/DLD-FUNCTIONS/colamd.cc @@ -226,7 +226,7 @@ @var{knobs} is an optional one- to three-element input vector. If @var{S} is\n\ m-by-n, then rows with more than @code{max(16,@var{knobs}(1)*sqrt(n))}\n\ entries are ignored. Columns with more than\n\ -@code{max(16,@var{knobs}(2)*sqrt(min(m,n)))} entries are removed prior to\n\ +@code{max (16,@var{knobs}(2)*sqrt(min(m,n)))} entries are removed prior to\n\ ordering, and ordered last in the output permutation @var{p}. Only\n\ completely dense rows or columns are removed if @code{@var{knobs}(1)} and\n\ @code{@var{knobs}(2)} are < 0, respectively. If @code{@var{knobs}(3)} is\n\ @@ -314,8 +314,8 @@ if (knobs [COLAMD_DENSE_ROW] >= 0) octave_stdout << "knobs(1): " << User_knobs (0) - << ", rows with > max(16," - << knobs [COLAMD_DENSE_ROW] << "*sqrt(size(A,2)))" + << ", rows with > max (16," + << knobs [COLAMD_DENSE_ROW] << "*sqrt (size(A,2)))" << " entries removed\n"; else octave_stdout << "knobs(1): " << User_knobs (0) @@ -323,8 +323,8 @@ if (knobs [COLAMD_DENSE_COL] >= 0) octave_stdout << "knobs(2): " << User_knobs (1) - << ", cols with > max(16," - << knobs [COLAMD_DENSE_COL] << "*sqrt(size(A)))" + << ", cols with > max (16," + << knobs [COLAMD_DENSE_COL] << "*sqrt (size(A)))" << " entries removed\n"; else octave_stdout << "knobs(2): " << User_knobs (1) @@ -415,7 +415,7 @@ // return the permutation vector NDArray out_perm (dim_vector (1, n_col)); for (octave_idx_type i = 0; i < n_col; i++) - out_perm(i) = p [colbeg [i]] + 1; + out_perm(i) = p[colbeg [i]] + 1; retval(0) = out_perm; @@ -464,7 +464,7 @@ \n\ @var{knobs} is an optional one- to two-element input vector. If @var{S} is\n\ n-by-n, then rows and columns with more than\n\ -@code{max(16,@var{knobs}(1)*sqrt(n))} entries are removed prior to ordering,\n\ +@code{max (16,@var{knobs}(1)*sqrt(n))} entries are removed prior to ordering,\n\ and ordered last in the output permutation @var{p}. No rows/columns are\n\ removed if @code{@var{knobs}(1) < 0}. If @code{@var{knobs} (2)} is nonzero,\n\ @code{stats} and @var{knobs} are printed. The default is @code{@var{knobs}\n\ @@ -608,7 +608,7 @@ // return the permutation vector NDArray out_perm (dim_vector (1, n_col)); for (octave_idx_type i = 0; i < n_col; i++) - out_perm(i) = perm [post [i]] + 1; + out_perm(i) = perm[post [i]] + 1; retval(0) = out_perm;
--- a/src/DLD-FUNCTIONS/daspk.cc +++ b/src/DLD-FUNCTIONS/daspk.cc @@ -321,7 +321,7 @@ { jac_name = unique_symbol_name ("__daspk_jac__"); jname = "function jac = "; - jname.append(jac_name); + jname.append (jac_name); jname.append (" (x, xdot, t, cj) jac = "); daspk_jac = extract_function (c(1), "daspk", jac_name, jname, "; endfunction"); @@ -377,7 +377,7 @@ { jac_name = unique_symbol_name ("__daspk_jac__"); jname = "function jac = "; - jname.append(jac_name); + jname.append (jac_name); jname.append (" (x, xdot, t, cj) jac = "); daspk_jac = extract_function (tmp(1), "daspk", jac_name, jname,
--- a/src/DLD-FUNCTIONS/dasrt.cc +++ b/src/DLD-FUNCTIONS/dasrt.cc @@ -409,7 +409,7 @@ { jac_name = unique_symbol_name ("__dasrt_jac__"); jname = "function jac = "; - jname.append(jac_name); + jname.append (jac_name); jname.append (" (x, xdot, t, cj) jac = "); dasrt_j = extract_function (c(1), "dasrt", jac_name, jname, "; endfunction"); @@ -461,7 +461,7 @@ { jac_name = unique_symbol_name ("__dasrt_jac__"); jname = "function jac = "; - jname.append(jac_name); + jname.append (jac_name); jname.append (" (x, xdot, t, cj) jac = "); dasrt_j = extract_function (tmp(1), "dasrt", jac_name, jname, "; endfunction");
--- a/src/DLD-FUNCTIONS/dassl.cc +++ b/src/DLD-FUNCTIONS/dassl.cc @@ -322,7 +322,7 @@ { jac_name = unique_symbol_name ("__dassl_jac__"); jname = "function jac = "; - jname.append(jac_name); + jname.append (jac_name); jname.append (" (x, xdot, t, cj) jac = "); dassl_jac = extract_function (c(1), "dassl", jac_name, jname, "; endfunction"); @@ -378,7 +378,7 @@ { jac_name = unique_symbol_name ("__dassl_jac__"); jname = "function jac = "; - jname.append(jac_name); + jname.append (jac_name); jname.append (" (x, xdot, t, cj) jac = "); dassl_jac = extract_function (tmp(1), "dassl", jac_name, jname,
--- a/src/DLD-FUNCTIONS/dmperm.cc +++ b/src/DLD-FUNCTIONS/dmperm.cc @@ -48,7 +48,7 @@ { RowVector ret (n); for (octave_idx_type i = 0; i < n; i++) - ret.xelem(i) = p[i] + 1; + ret.xelem (i) = p[i] + 1; return ret; }
--- a/src/DLD-FUNCTIONS/fft.cc +++ b/src/DLD-FUNCTIONS/fft.cc @@ -280,7 +280,7 @@ %! t = 2*pi*(0:1:N-1)/N; %! s = cos (n*t); %! -%! S = zeros (size(t)); +%! S = zeros (size (t)); %! S(n+1) = N/2; %! S(N-n+1) = N/2; %!
--- a/src/DLD-FUNCTIONS/filter.cc +++ b/src/DLD-FUNCTIONS/filter.cc @@ -716,9 +716,9 @@ %! y = filter (b, [1], x); %! assert (y, y0); -%!assert (filter (1, ones(10,1)/10, []), []) -%!assert (filter (1, ones(10,1)/10, zeros(0,10)), zeros(0,10)) -%!assert (filter (1, ones(10,1)/10, single (1:5)), repmat (single (10), 1, 5)) +%!assert (filter (1, ones (10,1) / 10, []), []) +%!assert (filter (1, ones (10,1) / 10, zeros (0,10)), zeros (0,10)) +%!assert (filter (1, ones (10,1) / 10, single (1:5)), repmat (single (10), 1, 5)) %% Test using initial conditions %!assert (filter ([1, 1, 1], [1, 1], [1 2], [1, 1]), [2 2])
--- a/src/DLD-FUNCTIONS/find.cc +++ b/src/DLD-FUNCTIONS/find.cc @@ -111,9 +111,9 @@ for (octave_idx_type j = 0; j < nc; j++) { OCTAVE_QUIT; - if (v.cidx(j) == 0 && v.cidx(j+1) != 0) + if (v.cidx (j) == 0 && v.cidx (j+1) != 0) start_nc = j; - if (v.cidx(j+1) >= n_to_find) + if (v.cidx (j+1) >= n_to_find) { end_nc = j + 1; break; @@ -125,9 +125,9 @@ for (octave_idx_type j = nc; j > 0; j--) { OCTAVE_QUIT; - if (v.cidx(j) == nz && v.cidx(j-1) != nz) + if (v.cidx (j) == nz && v.cidx (j-1) != nz) end_nc = j; - if (nz - v.cidx(j-1) >= n_to_find) + if (nz - v.cidx (j-1) >= n_to_find) { start_nc = j - 1; break; @@ -135,8 +135,8 @@ } } - count = (n_to_find > v.cidx(end_nc) - v.cidx(start_nc) ? - v.cidx(end_nc) - v.cidx(start_nc) : n_to_find); + count = (n_to_find > v.cidx (end_nc) - v.cidx (start_nc) ? + v.cidx (end_nc) - v.cidx (start_nc) : n_to_find); // If the original argument was a row vector, force a row vector of // the overall indices to be returned. But see below for scalar @@ -168,14 +168,14 @@ // there are elements to be found using the count that we want // to find. for (octave_idx_type j = start_nc, cx = 0; j < end_nc; j++) - for (octave_idx_type i = v.cidx(j); i < v.cidx(j+1); i++ ) + for (octave_idx_type i = v.cidx (j); i < v.cidx (j+1); i++ ) { OCTAVE_QUIT; if (direction < 0 && i < nz - count) continue; - i_idx(cx) = static_cast<double> (v.ridx(i) + 1); + i_idx(cx) = static_cast<double> (v.ridx (i) + 1); j_idx(cx) = static_cast<double> (j + 1); - idx(cx) = j * nr + v.ridx(i) + 1; + idx(cx) = j * nr + v.ridx (i) + 1; val(cx) = v.data(i); cx++; if (cx == count)
--- a/src/DLD-FUNCTIONS/gcd.cc +++ b/src/DLD-FUNCTIONS/gcd.cc @@ -76,8 +76,8 @@ static std::complex<FP> simple_gcd (const std::complex<FP>& a, const std::complex<FP>& b) { - if (! xisinteger (a.real ()) || ! xisinteger(a.imag ()) - || ! xisinteger (b.real ()) || ! xisinteger(b.imag ())) + if (! xisinteger (a.real ()) || ! xisinteger (a.imag ()) + || ! xisinteger (b.real ()) || ! xisinteger (b.imag ())) (*current_liboctave_error_handler) ("gcd: all complex parts must be integers"); @@ -156,8 +156,8 @@ extended_gcd (const std::complex<FP>& a, const std::complex<FP>& b, std::complex<FP>& x, std::complex<FP>& y) { - if (! xisinteger (a.real ()) || ! xisinteger(a.imag ()) - || ! xisinteger (b.real ()) || ! xisinteger(b.imag ())) + if (! xisinteger (a.real ()) || ! xisinteger (a.imag ()) + || ! xisinteger (b.real ()) || ! xisinteger (b.imag ())) (*current_liboctave_error_handler) ("gcd: all complex parts must be integers");
--- a/src/DLD-FUNCTIONS/kron.cc +++ b/src/DLD-FUNCTIONS/kron.cc @@ -88,7 +88,7 @@ for (octave_idx_type jb = 0; jb < ncb; jb++) { octave_quit (); - mx_inline_mul (nrb, &c.xelem(ja*nrb, ja*ncb + jb), a.dgelem (ja), b.data () + nrb*jb); + mx_inline_mul (nrb, &c.xelem (ja*nrb, ja*ncb + jb), a.dgelem (ja), b.data () + nrb*jb); } return c; @@ -110,7 +110,7 @@ octave_quit (); for (octave_idx_type Ai = A.cidx (Aj); Ai < A.cidx (Aj+1); Ai++) { - octave_idx_type Ci = A.ridx(Ai) * B.rows (); + octave_idx_type Ci = A.ridx (Ai) * B.rows (); const T v = A.data (Ai); for (octave_idx_type Bi = B.cidx (Bj); Bi < B.cidx (Bj+1); Bi++)
--- a/src/DLD-FUNCTIONS/lsode.cc +++ b/src/DLD-FUNCTIONS/lsode.cc @@ -171,7 +171,7 @@ @example\n\ @group\n\ dx\n\ --- = f(x, t)\n\ +-- = f (x, t)\n\ dt\n\ @end group\n\ @end example\n\ @@ -322,7 +322,7 @@ { jac_name = unique_symbol_name ("__lsode_jac__"); jname = "function jac = "; - jname.append(jac_name); + jname.append (jac_name); jname.append (" (x, t) jac = "); lsode_jac = extract_function (c(1), "lsode", jac_name, jname, "; endfunction"); @@ -378,7 +378,7 @@ { jac_name = unique_symbol_name ("__lsode_jac__"); jname = "function jac = "; - jname.append(jac_name); + jname.append (jac_name); jname.append (" (x, t) jac = "); lsode_jac = extract_function (tmp(1), "lsode", jac_name, jname,
--- a/src/DLD-FUNCTIONS/lu.cc +++ b/src/DLD-FUNCTIONS/lu.cc @@ -179,7 +179,7 @@ error ("lu: can not define pivoting threshold THRES for full matrices"); else if (tmp.nelem () == 1) { - thres.resize(1,2); + thres.resize (1,2); thres(0) = tmp(0); thres(1) = tmp(0); }
--- a/src/DLD-FUNCTIONS/luinc.cc +++ b/src/DLD-FUNCTIONS/luinc.cc @@ -154,7 +154,7 @@ if (thresh.nelem () == 1) { - thresh.resize(1,2); + thresh.resize (1,2); thresh(1) = thresh(0); } else if (thresh.nelem () != 2)
--- a/src/DLD-FUNCTIONS/quad.cc +++ b/src/DLD-FUNCTIONS/quad.cc @@ -192,7 +192,7 @@ absolute tolerance, and the second element is the desired relative\n\ tolerance. To choose a relative test only, set the absolute\n\ tolerance to zero. To choose an absolute test only, set the relative\n\ -tolerance to zero. Both tolerances default to @code{sqrt(eps)} or\n\ +tolerance to zero. Both tolerances default to @code{sqrt (eps)} or\n\ approximately @math{1.5e^{-8}}.\n\ \n\ The optional argument @var{sing} is a vector of values at which the\n\
--- a/src/DLD-FUNCTIONS/quadcc.cc +++ b/src/DLD-FUNCTIONS/quadcc.cc @@ -1493,7 +1493,7 @@ \n\ @var{a} and @var{b} are the lower and upper limits of integration. Either\n\ or both limits may be infinite. @code{quadcc} handles an inifinite limit\n\ -by substituting the variable of integration with @code{x=tan(pi/2*u)}.\n\ +by substituting the variable of integration with @code{x = tan (pi/2*u)}.\n\ \n\ The optional argument @var{tol} defines the relative tolerance used to stop\n\ the integration procedure. The default value is @math{1e^{-6}}.\n\
--- a/src/DLD-FUNCTIONS/rand.cc +++ b/src/DLD-FUNCTIONS/rand.cc @@ -448,7 +448,7 @@ using the \"reset\" keyword.\n\ \n\ The class of the value returned can be controlled by a trailing \"double\"\n\ -or \"single\" argument. These are the only valid classes.\n\ +or \"single\" argument. These are the only valid classes.\n\ @seealso{randn, rande, randg, randp}\n\ @end deftypefn") { @@ -556,7 +556,7 @@ to transform from a uniform to a normal distribution.\n\ \n\ The class of the value returned can be controlled by a trailing \"double\"\n\ -or \"single\" argument. These are the only valid classes.\n\ +or \"single\" argument. These are the only valid classes.\n\ \n\ Reference: G. Marsaglia and W.W. Tsang,\n\ @cite{Ziggurat Method for Generating Random Variables},\n\ @@ -626,7 +626,7 @@ to transform from a uniform to an exponential distribution.\n\ \n\ The class of the value returned can be controlled by a trailing \"double\"\n\ -or \"single\" argument. These are the only valid classes.\n\ +or \"single\" argument. These are the only valid classes.\n\ \n\ Reference: G. Marsaglia and W.W. Tsang,\n\ @cite{Ziggurat Method for Generating Random Variables},\n\ @@ -691,7 +691,7 @@ @deftypefnx {Loadable Function} {} randg (\"seed\", \"reset\")\n\ @deftypefnx {Loadable Function} {} randg (@dots{}, \"single\")\n\ @deftypefnx {Loadable Function} {} randg (@dots{}, \"double\")\n\ -Return a matrix with @code{gamma(@var{a},1)} distributed random elements.\n\ +Return a matrix with @code{gamma (@var{a},1)} distributed random elements.\n\ The arguments are handled the same as the arguments for @code{rand},\n\ except for the argument @var{a}.\n\ \n\ @@ -772,7 +772,7 @@ @end table\n\ \n\ The class of the value returned can be controlled by a trailing \"double\"\n\ -or \"single\" argument. These are the only valid classes.\n\ +or \"single\" argument. These are the only valid classes.\n\ @seealso{rand, randn, rande, randp}\n\ @end deftypefn") { @@ -994,7 +994,7 @@ @end table\n\ \n\ The class of the value returned can be controlled by a trailing \"double\"\n\ -or \"single\" argument. These are the only valid classes.\n\ +or \"single\" argument. These are the only valid classes.\n\ @seealso{rand, randn, rande, randg}\n\ @end deftypefn") { @@ -1105,7 +1105,7 @@ replacement from @code{1:@var{n}}. The complexity is O(@var{n}) in\n\ memory and O(@var{m}) in time, unless @var{m} < @var{n}/5, in which case\n\ O(@var{m}) memory is used as well. The randomization is performed using\n\ -rand(). All permutations are equally likely.\n\ +rand(). All permutations are equally likely.\n\ @seealso{perms}\n\ @end deftypefn") {
--- a/src/DLD-FUNCTIONS/regexp.cc +++ b/src/DLD-FUNCTIONS/regexp.cc @@ -508,7 +508,7 @@ Cell cellpat = args(1).cell_value (); for (int j = 0; j < nargout; j++) - newretval[j].resize(cellpat.dims ()); + newretval[j].resize (cellpat.dims ()); for (octave_idx_type i = 0; i < cellpat.numel (); i++) {
--- a/src/DLD-FUNCTIONS/schur.cc +++ b/src/DLD-FUNCTIONS/schur.cc @@ -286,7 +286,7 @@ %! assert (u' * a * u, s, sqrt (eps ("single"))); %!test -%! fail("schur ([1, 2; 3, 4], 2)", "warning"); +%! fail ("schur ([1, 2; 3, 4], 2)", "warning"); %!error schur () %!error <argument must be a square matrix> schur ([1, 2, 3; 4, 5, 6])
--- a/src/DLD-FUNCTIONS/str2double.cc +++ b/src/DLD-FUNCTIONS/str2double.cc @@ -402,5 +402,5 @@ %!assert (str2double ("-i*NaN - Inf"), complex (-Inf, -NaN)) %!assert (str2double ({"abc", "4i"}), [NaN + 0i, 4i]) %!assert (str2double ({2, "4i"}), [NaN + 0i, 4i]) -%!assert (str2double (zeros(3,1,2)), NaN (3,1,2)) +%!assert (str2double (zeros (3,1,2)), NaN (3,1,2)) */
--- a/src/DLD-FUNCTIONS/symbfact.cc +++ b/src/DLD-FUNCTIONS/symbfact.cc @@ -223,13 +223,13 @@ if (cm->status < CHOLMOD_OK) { - error("matrix corrupted"); + error ("matrix corrupted"); goto symbfact_error; } if (CHOLMOD_NAME(postorder) (Parent, n, 0, Post, cm) != n) { - error("postorder failed"); + error ("postorder failed"); goto symbfact_error; } @@ -238,7 +238,7 @@ if (cm->status < CHOLMOD_OK) { - error("matrix corrupted"); + error ("matrix corrupted"); goto symbfact_error; } @@ -289,7 +289,7 @@ /* create a copy of the column pointers */ octave_idx_type *W = First; for (octave_idx_type j = 0 ; j < n ; j++) - W [j] = L.xcidx(j); + W[j] = L.xcidx (j); // get workspace for computing one row of L cholmod_sparse *R = cholmod_allocate_sparse (n, 1, n, false, true,
--- a/src/DLD-FUNCTIONS/symrcm.cc +++ b/src/DLD-FUNCTIONS/symrcm.cc @@ -182,7 +182,7 @@ CMK_Node r = H[0]; H[0] = H[--h]; if (reorg) - H_heapify_min(H, 0, h); + H_heapify_min (H, 0, h); return r; } @@ -601,7 +601,7 @@ w.id = r2; w.deg = D[r2]; w.dist = v.dist+1; - H_insert(S, s, w); + H_insert (S, s, w); visit[r2] = true; } } @@ -613,7 +613,7 @@ w.id = r1; w.deg = D[r1]; w.dist = v.dist+1; - H_insert(S, s, w); + H_insert (S, s, w); visit[r1] = true; } } @@ -628,7 +628,7 @@ w.id = r1; w.deg = D[r1]; w.dist = v.dist+1; - H_insert(S, s, w); + H_insert (S, s, w); visit[r1] = true; } j1++; @@ -642,7 +642,7 @@ w.id = r2; w.deg = D[r2]; w.dist = v.dist+1; - H_insert(S, s, w); + H_insert (S, s, w); visit[r2] = true; } j2++; @@ -656,7 +656,7 @@ OCTAVE_QUIT; // locate a neighbor of i with minimal degree in O(log(N)) - v = H_remove_min(S, s, 1); + v = H_remove_min (S, s, 1); // entered the BFS a new level? if (v.dist > level) @@ -700,9 +700,9 @@ s = N / 2 - 1; for (octave_idx_type i = 0, j = N - 1; i <= s; i++, j--) { - double tmp = P.elem(i); - P.elem(i) = P.elem(j); - P.elem(j) = tmp; + double tmp = P.elem (i); + P.elem (i) = P.elem (j); + P.elem (j) = tmp; } // increment all indices, since Octave is not C
--- a/src/DLD-FUNCTIONS/tril.cc +++ b/src/DLD-FUNCTIONS/tril.cc @@ -137,8 +137,8 @@ octave_idx_type nc = m.cols (); for (octave_idx_type j = 0; j < nc; j++) - for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) - if (m.ridx(i) < j-k) + for (octave_idx_type i = m.cidx (j); i < m.cidx (j+1); i++) + if (m.ridx (i) < j-k) m.data(i) = 0.; m.maybe_compress (true); @@ -159,8 +159,8 @@ octave_idx_type nc = m.cols (); for (octave_idx_type j = 0; j < nc; j++) - for (octave_idx_type i = m.cidx(j); i < m.cidx(j+1); i++) - if (m.ridx(i) > j-k) + for (octave_idx_type i = m.cidx (j); i < m.cidx (j+1); i++) + if (m.ridx (i) > j-k) m.data(i) = 0.; m.maybe_compress (true); @@ -290,8 +290,8 @@ idx_tmp.push_back (ov_idx); ov_idx(1) = static_cast<double> (nc); tmp = tmp.resize (dim_vector (0,0)); - tmp = tmp.subsasgn("(",idx_tmp, arg.do_index_op (ov_idx)); - tmp = tmp.resize(dims); + tmp = tmp.subsasgn ("(",idx_tmp, arg.do_index_op (ov_idx)); + tmp = tmp.resize (dims); if (lower) { @@ -305,7 +305,7 @@ std::list<octave_value_list> idx; idx.push_back (ov_idx); - tmp = tmp.subsasgn ("(", idx, arg.do_index_op(ov_idx)); + tmp = tmp.subsasgn ("(", idx, arg.do_index_op (ov_idx)); if (error_state) return retval; @@ -323,7 +323,7 @@ std::list<octave_value_list> idx; idx.push_back (ov_idx); - tmp = tmp.subsasgn ("(", idx, arg.do_index_op(ov_idx)); + tmp = tmp.subsasgn ("(", idx, arg.do_index_op (ov_idx)); if (error_state) return retval;
--- a/src/DLD-FUNCTIONS/urlwrite.cc +++ b/src/DLD-FUNCTIONS/urlwrite.cc @@ -420,7 +420,7 @@ size_t pos = 0; while (true) { - pos = str.find_first_of('\n', pos); + pos = str.find_first_of ('\n', pos); if (pos == std::string::npos) break; pos++; @@ -430,7 +430,7 @@ pos = 0; for (octave_idx_type i = 0; i < n; i++) { - size_t newpos = str.find_first_of('\n', pos); + size_t newpos = str.find_first_of ('\n', pos); if (newpos == std::string::npos) break; @@ -467,11 +467,11 @@ { fileisdir = false; time_t ft; - curl_easy_getinfo(rep->handle (), CURLINFO_FILETIME, &ft); + curl_easy_getinfo (rep->handle (), CURLINFO_FILETIME, &ft); filetime = ft; double fs; - curl_easy_getinfo(rep->handle (), - CURLINFO_CONTENT_LENGTH_DOWNLOAD, &fs); + curl_easy_getinfo (rep->handle (), + CURLINFO_CONTENT_LENGTH_DOWNLOAD, &fs); filesize = fs; } } @@ -508,7 +508,7 @@ // Can I assume that the path is alway in "" on the last line size_t pos2 = retval.rfind ('"'); size_t pos1 = retval.rfind ('"', pos2 - 1); - retval = retval.substr(pos1 + 1, pos2 - pos1 - 1); + retval = retval.substr (pos1 + 1, pos2 - pos1 - 1); } setopt (CURLOPT_HEADERFUNCTION, 0); setopt (CURLOPT_WRITEHEADER, 0); @@ -608,7 +608,7 @@ curl_handles (void) : map () { - curl_global_init(CURL_GLOBAL_DEFAULT); + curl_global_init (CURL_GLOBAL_DEFAULT); } ~curl_handles (void)
--- a/src/data.cc +++ b/src/data.cc @@ -5648,7 +5648,7 @@ DEFUN (tic, args, nargout, "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} tic ()\n\ -@deftypefnx {Built-in Function} {@var{id} =} tic ()\n\ +@deftypefnx {Built-in Function} {@var{id} =} tic ()\n\ @deftypefnx {Built-in Function} {} toc ()\n\ @deftypefnx {Built-in Function} {} toc (@var{id})\n\ @deftypefnx {Built-in Function} {@var{val} =} toc (@dots{})\n\ @@ -5715,9 +5715,9 @@ DEFUN (toc, args, nargout, "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} toc ()\n\ +@deftypefn {Built-in Function} {} toc ()\n\ @deftypefnx {Built-in Function} {} toc (@var{id})\n\ -@deftypefnx {Built-in Function} {@var{val} = } toc (@dots{})\n\ +@deftypefnx {Built-in Function} {@var{val} =} toc (@dots{})\n\ See tic.\n\ @end deftypefn") {
--- a/src/input.cc +++ b/src/input.cc @@ -1539,9 +1539,9 @@ @end example\n\ \n\ @noindent\n\ -returns the help string associated with the sub-function @code{mysubfunc}\n\ +returns the help string associated with the subfunction @code{mysubfunc}\n\ of the function @code{myfunc}. Another use of @code{filemarker} is when\n\ -debugging it allows easier placement of breakpoints within sub-functions.\n\ +debugging it allows easier placement of breakpoints within subfunctions.\n\ For example,\n\ \n\ @example\n\