diff --git a/inst/@sym/and.m b/inst/@sym/and.m index a6b24c37b..7a4506b57 100644 --- a/inst/@sym/and.m +++ b/inst/@sym/and.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014-2016, 2018 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014-2016, 2018, 2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -59,7 +60,7 @@ %! assert (isequal (t & t, t)) %!test -%! % mix wih nonsym +%! % mix with nonsym %! assert (isequal (t & false, f)) %! assert (isequal (t & true, t)) %! assert (isequal (t & 0, f)) diff --git a/inst/@sym/coeffs.m b/inst/@sym/coeffs.m index 21839cf89..682ef4ea9 100644 --- a/inst/@sym/coeffs.m +++ b/inst/@sym/coeffs.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014-2017, 2019, 2022-2023 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014-2017, 2019, 2022-2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -164,7 +165,7 @@ c = fliplr(c); end - % if nargout == 1, its simplier to use 'p.coeffs()' + % if nargout == 1, its simpler to use 'p.coeffs()' end diff --git a/inst/@sym/eq.m b/inst/@sym/eq.m index b4fce6ee6..0591fd7b1 100644 --- a/inst/@sym/eq.m +++ b/inst/@sym/eq.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014, 2016 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014, 2016, 2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -82,6 +83,7 @@ %% @seealso{@@sym/logical, @@sym/isAlways, @@sym/isequal, @@sym/ne, @@sym/le} %% @end defop + function t = eq(x, y) if (nargin ~= 2) @@ -118,7 +120,7 @@ %! assert (isa (e, 'sym')) %!test -%! % ... except of course via cancelation +%! % ... except of course via cancellation %! syms x %! e = x - x == 0; %! assert (logical (e)) diff --git a/inst/@sym/ezmesh.m b/inst/@sym/ezmesh.m index 499422e21..116d8719d 100644 --- a/inst/@sym/ezmesh.m +++ b/inst/@sym/ezmesh.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2019, 2023 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2019, 2023-2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -74,7 +75,7 @@ for i = firstpotsym:nargin if (isa(varargin{i}, 'sym')) if (i < firstpotsym + maxnumsym) - % one of the fcns to plot, covert to handle fcn + % one of the fcns to plot, convert to handle fcn % Each is function of one var, and its the same var for all thissym = symvar(varargin{i}); diff --git a/inst/@sym/ezplot3.m b/inst/@sym/ezplot3.m index ebb1e35f6..44cd916b8 100644 --- a/inst/@sym/ezplot3.m +++ b/inst/@sym/ezplot3.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014-2016, 2023 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014-2016, 2023-2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -59,7 +60,7 @@ for i = firstpotsym:nargin if (isa(varargin{i}, 'sym')) if (i < firstpotsym + maxnumsym) - % one of the fcns to plot, covert to handle fcn + % one of the fcns to plot, convert to handle fcn % Each is function of one var, and its the same var for all thissym = symvar(varargin{i}); diff --git a/inst/@sym/ezsurf.m b/inst/@sym/ezsurf.m index 00396b1f6..a2c7333bd 100644 --- a/inst/@sym/ezsurf.m +++ b/inst/@sym/ezsurf.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2016-2017, 2019, 2023 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2016-2017, 2019, 2023-2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -74,7 +75,7 @@ for i = firstpotsym:nargin if (isa(varargin{i}, 'sym')) if (i < firstpotsym + maxnumsym) - % one of the fcns to plot, covert to handle fcn + % one of the fcns to plot, convert to handle fcn % Each is function of one var, and its the same var for all thissym = symvar(varargin{i}); diff --git a/inst/@sym/fourier.m b/inst/@sym/fourier.m index 64e02f729..5a1c7732b 100644 --- a/inst/@sym/fourier.m +++ b/inst/@sym/fourier.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014-2016, 2019 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014-2016, 2019, 2024 Colin B. Macdonald %% Copyright (C) 2015-2016 Andrés Prieto %% Copyright (C) 2015 Alexander Misel %% @@ -176,7 +177,7 @@ %!test -%! % matlab SMT compatibiliy for arguments +%! % matlab SMT compatibility for arguments %! syms r x u w v %! Pi=sym('pi'); %! assert(logical( fourier(exp(-x^2)) == sqrt(Pi)/exp(w^2/4) )) diff --git a/inst/@sym/function_handle.m b/inst/@sym/function_handle.m index 86c34e229..416d27df5 100644 --- a/inst/@sym/function_handle.m +++ b/inst/@sym/function_handle.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014-2019, 2023 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014-2019, 2023-2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -217,7 +218,7 @@ %! assert(t1 == 30 && t2 == 8) %!test -%! % cell arrays specfies order, overriding symvar order +%! % cell arrays specify order, overriding symvar order %! h = function_handle(x*y, 12/y, 'vars', {y x}); %! [t1, t2] = h(3, 6); %! assert(t1 == 18 && t2 == 4) @@ -226,7 +227,7 @@ %! assert(t1 == 18 && t2 == 4) %!test -%! % cell arrays specfies order, overriding symvar order +%! % cell arrays specify order, overriding symvar order %! h = function_handle(x*y, 12/y, 'vars', {y x}); %! [t1, t2] = h(3, 6); %! assert(t1 == 18 && t2 == 4) diff --git a/inst/@sym/horzcat.m b/inst/@sym/horzcat.m index cac1fbd65..8af7c13ef 100644 --- a/inst/@sym/horzcat.m +++ b/inst/@sym/horzcat.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014-2017, 2019 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014-2017, 2019, 2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -21,7 +22,7 @@ %% @defop Method @@sym {horzcat} {(@var{x}, @var{y}, @dots{})} %% @defopx Operator @@sym {[@var{x}, @var{y}, @dots{}]} {} %% @defopx Operator @@sym {[@var{x} @var{y} @dots{}]} {} -%% Horizontally concatentate symbolic arrays. +%% Horizontally concatenate symbolic arrays. %% %% Example: %% @example @@ -42,11 +43,10 @@ %% @seealso{@@sym/vertcat, @@sym/cat} %% @end defop - function h = horzcat(varargin) % special case for 0x0 but other empties should be checked for - % compatibilty + % compatibility cmd = { '_proc = []' 'for i in _ins:' diff --git a/inst/@sym/ifourier.m b/inst/@sym/ifourier.m index 6efb26757..0b48c5657 100644 --- a/inst/@sym/ifourier.m +++ b/inst/@sym/ifourier.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014-2016, 2018-2019, 2022 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014-2016, 2018-2019, 2022, 2024 Colin B. Macdonald %% Copyright (C) 2015-2016 Andrés Prieto %% Copyright (C) 2015 Alexander Misel %% @@ -86,7 +87,7 @@ if (nargin == 3) k = sym(varargin{2}); else - %% frequency domain variable not specifed + %% frequency domain variable not specified % if exactly one symbol has char(k) == 'k'... symbols = findsymbols (F); charsyms = cell (size (symbols)); diff --git a/inst/@sym/ilaplace.m b/inst/@sym/ilaplace.m index 2be0ca284..8bc68a034 100644 --- a/inst/@sym/ilaplace.m +++ b/inst/@sym/ilaplace.m @@ -1,3 +1,4 @@ +%% SPDX-License-Identifier: AGPL-3.0-or-later %% Copyright (C) 2014-2016 Andrés Prieto %% Copyright (C) 2015-2016, 2018-2019, 2022-2024 Colin Macdonald %% @@ -63,9 +64,9 @@ %% @end group %% @end example %% -%% By default the ouput is a function of @code{t} (or @code{x} if the +%% By default the output is a function of @code{t} (or @code{x} if the %% inverse transform happens to be with respect to @code{t}). This can -%% be overriden by specifying @var{t}. For example: +%% be overridden by specifying @var{t}. For example: %% @example %% @group %% syms s diff --git a/inst/@sym/laplace.m b/inst/@sym/laplace.m index 26c9efc1d..982fe3733 100644 --- a/inst/@sym/laplace.m +++ b/inst/@sym/laplace.m @@ -1,3 +1,4 @@ +%% SPDX-License-Identifier: AGPL-3.0-or-later %% Copyright (C) 2014-2016 Andrés Prieto %% Copyright (C) 2015-2016, 2019, 2024 Colin Macdonald %% @@ -55,8 +56,8 @@ %% @end group %% @end example %% -%% By default the ouput is a function of @code{s} (or @code{z} if the Laplace -%% transform happens to be with respect to @code{s}). This can be overriden +%% By default the output is a function of @code{s} (or @code{z} if the Laplace +%% transform happens to be with respect to @code{s}). This can be overridden %% by specifying @var{s}. For example: %% @example %% @group @@ -81,7 +82,7 @@ %% %% If not specified by @var{t}, the independent variable is chosen by %% looking for a symbol named @code{t}. If no such symbol is found, -%% @pxref{@@sym/symvar} is used, which choses a variable close to @code{x}: +%% @pxref{@@sym/symvar} is used, which chooses a variable close to @code{x}: %% @example %% @group %% syms a y diff --git a/inst/@sym/private/mat_rclist_asgn.m b/inst/@sym/private/mat_rclist_asgn.m index ce779776e..7df96f69d 100644 --- a/inst/@sym/private/mat_rclist_asgn.m +++ b/inst/@sym/private/mat_rclist_asgn.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014, 2016-2017, 2019, 2022 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014, 2016-2017, 2019, 2022, 2024 Colin B. Macdonald %% Copyright (C) 2020 Mike Miller %% Copyright (C) 2020 Fernando Alvarruiz %% @@ -20,7 +21,7 @@ %% -*- texinfo -*- %% @defun mat_rclist_asgn (@var{A}, @var{r}, @var{c}, @var{B}) -%% Private helper routine for sym array assigment using lists. +%% Private helper routine for sym array assignment using lists. %% %% @code{(R(i),C(i))} specify entries of the matrix @var{A}. %% We execute @code{A(R(i),C(i)) = B(i)}. diff --git a/inst/@sym/subs.m b/inst/@sym/subs.m index 543344090..1cdbe8ee0 100644 --- a/inst/@sym/subs.m +++ b/inst/@sym/subs.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014-2017, 2019, 2022 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014-2017, 2019, 2022, 2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -123,7 +124,7 @@ %% @end group %% @end example %% -%% When using multiple variables and matrix substitions, it may be +%% When using multiple variables and matrix substutions, it may be %% helpful to use cell arrays: %% @example %% @group @@ -170,7 +171,6 @@ %% @seealso{@@sym/symfun} %% @end defmethod - function g = subs(f, in, out) if (nargin > 3) @@ -255,7 +255,7 @@ '# more complicated when dealing with matrix/vector' 'sizes = {(a.shape if a.is_Matrix else (1, 1)) for a in yy}' 'sizes.discard((1, 1))' - 'assert len(sizes) == 1, "all substitions must be same size or scalar"' + 'assert len(sizes) == 1, "all substitutions must be same size or scalar"' 'size = sizes.pop()' 'numel = prod(size)' 'g = [0]*numel' diff --git a/inst/@sym/sym.m b/inst/@sym/sym.m index 7d490af0d..56eef76c4 100644 --- a/inst/@sym/sym.m +++ b/inst/@sym/sym.m @@ -1,3 +1,4 @@ +%% SPDX-License-Identifier: AGPL-3.0-or-later %% Copyright (C) 2014-2019, 2022-2024 Colin B. Macdonald %% Copyright (C) 2016 Lagu %% @@ -1087,9 +1088,9 @@ %! assert (strcmp (s1, s2)) %!test -%! % For SMT 2014 compatibilty, I and E would become ImaginaryUnit and Exp(1) +%! % For SMT 2014 compatibility, I and E would become ImaginaryUnit and Exp(1) %! % but I'm not sure this is by design. This test would need to change if -%! % we want stricter SMT compatibilty. +%! % we want stricter SMT compatibility. %! f = sym ('f(x, I, E)'); %! s1 = sympy (f); %! s2 = 'Function(''f'')(Symbol(''x''), Symbol(''I''), Symbol(''E''))'; diff --git a/inst/@sym/vertcat.m b/inst/@sym/vertcat.m index 09a8ea787..9f46f6dab 100644 --- a/inst/@sym/vertcat.m +++ b/inst/@sym/vertcat.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014-2017, 2019 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014-2017, 2019, 2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -20,7 +21,7 @@ %% @documentencoding UTF-8 %% @defop Method @@sym {vertcat} {(@var{x}, @var{y}, @dots{})} %% @defopx Operator @@sym {[@var{x}; @var{y}; @dots{}]} {} -%% Vertically concatentate symbolic arrays. +%% Vertically concatenate symbolic arrays. %% %% Example: %% @example @@ -39,11 +40,10 @@ %% @seealso{@@sym/horzcat, @@sym/cat} %% @end defop - function h = vertcat(varargin) % special case for 0x0 but other empties should be checked for - % compatibilty + % compatibility cmd = { '_proc = []' 'for i in _ins:' diff --git a/inst/@symfun/int.m b/inst/@symfun/int.m index 149a09616..5ef6bc050 100644 --- a/inst/@symfun/int.m +++ b/inst/@symfun/int.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014, 2016, 2019 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014, 2016, 2019, 2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -50,9 +51,6 @@ %% @seealso{@@sym/int, @@symfun/diff} %% @end defmethod -%% Author: Colin B. Macdonald -%% Keywords: symbolic, integration - function F = int(f, varargin) if (nargin == 1) @@ -106,7 +104,7 @@ %! assert (~isa(g, 'symfun')) %!test -%! % ... even if the input is abstract funcion +%! % ... even if the input is abstract function %! syms f(x) %! g = int(f, x, 0, 2); %! assert (isa(g, 'sym')) diff --git a/inst/findsymbols.m b/inst/findsymbols.m index 9d43dd09b..4d260ee60 100644 --- a/inst/findsymbols.m +++ b/inst/findsymbols.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014, 2016, 2018-2019, 2022 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014, 2016, 2018-2019, 2022, 2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -163,7 +164,7 @@ %! assert (isequal (findsymbols(f), {a y})) %!test -%! % sorts lexigraphically, same as symvar *with single input* +%! % sorts lexicographically, same as symvar *with single input* %! % (note symvar does something different with 2 inputs). %! syms A B a b x y X Y %! f = A*a*B*b*y*X*Y*x; diff --git a/inst/poly2sym.m b/inst/poly2sym.m index 461400f8d..b28d336cb 100644 --- a/inst/poly2sym.m +++ b/inst/poly2sym.m @@ -1,5 +1,6 @@ +%% SPDX-License-Identifier: AGPL-3.0-or-later %% Copyright (C) 2003 Willem J. Atsma -%% Copyright (C) 2014-2016 Colin B. Macdonald +%% Copyright (C) 2014-2016, 2024 Colin B. Macdonald %% %% This program is free software; you can redistribute it and/or %% modify it under the terms of the GNU General Public @@ -88,7 +89,7 @@ %!assert(isAlways( poly2sym([1 2 3 4],5) == subs(p,x,5) )) %!assert(isequal( poly2sym ([1]), 1 )) %!assert(isequal( poly2sym ([]), 0 )) -%% symbolic coefficents +%% symbolic coefficients %!assert(isAlways( poly2sym(sym([1 2 3 4]),x) == p )) %!assert(isAlways( poly2sym([a b c],x) == a*x^2 + b*x + c )) %!assert(isAlways( poly2sym([a b c]) == a*x^2 + b*x + c )) diff --git a/inst/private/python_ipc_popen2.m b/inst/private/python_ipc_popen2.m index 2d82de5e9..75b0e0ffa 100644 --- a/inst/private/python_ipc_popen2.m +++ b/inst/private/python_ipc_popen2.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014-2019, 2022 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014-2019, 2022, 2024 Colin B. Macdonald %% Copyright (C) 2018, 2020 Mike Miller %% Copyright (C) 2022 Alex Vong %% @@ -33,6 +34,7 @@ %% @code{@var{info}.raw}: the raw output, for debugging. %% @end deftypefun + function [A, info] = python_ipc_popen2(what, cmd, varargin) persistent emergency_cleanup fin fout pid @@ -138,7 +140,7 @@ %% load all the inputs into python as pickles % they will be in the list '_ins' - % there is a try-except block here, sends a block if sucessful + % there is a try-except block here, sends a block if successful loc = python_copy_vars_to('_ins', true, varargin{:}); write_lines(fin, loc, true); fflush(fin); diff --git a/inst/vpa.m b/inst/vpa.m index 9ad5389e8..59320030e 100644 --- a/inst/vpa.m +++ b/inst/vpa.m @@ -1,4 +1,5 @@ -%% Copyright (C) 2014-2019, 2021-2022 Colin B. Macdonald +%% SPDX-License-Identifier: AGPL-3.0-or-later +%% Copyright (C) 2014-2019, 2021-2022, 2024 Colin B. Macdonald %% %% This file is part of OctSymPy. %% @@ -84,7 +85,7 @@ %% @end group %% @end example %% -%% Instead, it is preferrable to use @code{sym} or @code{vpa} on the +%% Instead, it is preferable to use @code{sym} or @code{vpa} on the %% inner-most parts of your expression: %% @example %% @group