* [#14488](https://bugzilla.scilab.org/14488): The `frameflag=9` and `strf=".9."` values of these `plot2d` options were no longer accepted. Their documentation was ambiguous.
* [#14718](https://bugzilla.scilab.org/14718): `user` is removed for a while but was still documented.
* [#14873](https://bugzilla.scilab.org/14873): `setfield` page: The output and the 6.0 history were documented only on the en_US version. The input was wrongly restricted to matrices, while any Scilab object is acceptable. The specific role of `setfield` for mlists was not really described nor illustrated. The example did not include any call to setfield.
-* [#15012](https://bugzilla.scilab.org/15012): `covStart(["isempty" ; "isscalar"])` crashed Scilab.
+* [#15012](https://bugzilla.scilab.org/15012): `covStart(["isempty" ; "isscalar"])` crashed Scilab.
* [#15163](https://bugzilla.scilab.org/15163): `getdate` page: The time referential was obscure: a) UTC for Unix Time Convention vs Coordinated Universal Time. b) unclear influence of the time zone.
* [#15280](https://bugzilla.scilab.org/15280): `gsort` was unable to sort any hypermatrix along dimensions > "r"|"c".
* [#15839](https://bugzilla.scilab.org/15839): `gsort`: the only sparse possible input were real or complex vectors, and only with the `g` method.
* [#16106](https://bugzilla.scilab.org/16106): Xcos sciblk4 user-defined blocks did not handle opar and odstate/oz correctly.
* [#16122](https://bugzilla.scilab.org/16122): concat polynomials with <> var did not raise an error.
* [#16151](https://bugzilla.scilab.org/16151): `isequal(1:$, 2:$)` returned `%T`.
-* [#16193](https://bugzilla.scilab.org/16193): `covStart()` clear previous coverage information. `profileEnable()` could be use to append a macro later on.
-* [#16196](https://bugzilla.scilab.org/16196): `covStart()` help page was incomplete about the API usage.
+* [#16193](https://bugzilla.scilab.org/16193): `covStart()` clear previous coverage information. `profileEnable()` could be use to append a macro later on.
+* [#16196](https://bugzilla.scilab.org/16196): `covStart()` help page was incomplete about the API usage.
* [#16274](https://bugzilla.scilab.org/16274): assert_checkequal() did not considered equal matching Nan or void elements in (nested) containers.
* [#16337](https://bugzilla.scilab.org/16337): The 3rd output of `[U,km,ku] = unique(..)` was not implemented.
* [#16342](https://bugzilla.scilab.org/16342): `strcat()` was much slower in Scilab 6.0.2.
* [#16465](https://bugzilla.scilab.org/16465): Scinotes OpenRecent menu was not updated when it should.
* [#16473](https://bugzilla.scilab.org/16473): Deleting rows in a sparse squared the matrix with padding zeros (Scilab 6 regression).
* [#16474](https://bugzilla.scilab.org/16474): `imult(%z)` crashed Scilab.
+* [#16488](https://bugzilla.scilab.org/16488): Concatenations mixing boolean and double with at least one operand being sparse were not supported.
* [#16496](https://bugzilla.scilab.org/16496): The `getdate` page should be rewritten: a) `getdate("s")` does NOT take leap seconds into account. b) `D=getdate(X)` is vectorized, accepts fractional seconds and returns them in `[0,1)` in D(10) instead of milliseconds. Moreover, the time referential of the result was unclear (time zone, daylight saving offset).
* [#16512](https://bugzilla.scilab.org/16512): 1 ./ uint8(0) crashes Scilab (idem with int8, uint16, int16, uint32, int32, uint64, int64).
* [#16517](https://bugzilla.scilab.org/16517): `getdate("s")` truncated the actual time to integer seconds. `getdate(u)(10)` returned fractional seconds instead of milliseconds as `getdate()`.
--- /dev/null
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON - Le Mans Université
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function r = %b_c_sp(a, b)
+ // [boolean , sparse]
+ r = [sparse(bool2s(a)) , b]
+endfunction
--- /dev/null
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON - Le Mans Université
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function r = %b_f_sp(a, b)
+ // [boolean ; sparse]
+ r = [sparse(bool2s(a)) ; b]
+endfunction
--- /dev/null
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON - Le Mans Université
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function r = %s_c_spb(a, b)
+ // [double , sparse bool]
+ r = [sparse(a) , bool2s(b)]
+endfunction
--- /dev/null
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON - Le Mans Université
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function r = %s_f_spb(a, b)
+ // [double ; sparse bool]
+ r = [sparse(a) ; bool2s(b)]
+endfunction
--- /dev/null
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON - Le Mans Université
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function r = %sp_c_b(a, b)
+ // [sparse , boolean]
+ r = [a , sparse(bool2s(b))]
+endfunction
--- /dev/null
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON - Le Mans Université
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function r = %sp_c_spb(a, b)
+ // [sparse , sparse boolean]
+ r = [a , bool2s(b)]
+endfunction
--- /dev/null
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON - Le Mans Université
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function r = %sp_f_b(a, b)
+ // [sparse ; boolean]
+ r = [a ; sparse(bool2s(b))]
+endfunction
--- /dev/null
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON - Le Mans Université
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function r = %sp_f_spb(a, b)
+ // [sparse ; sparse bool]
+ r = [a ; bool2s(b)]
+endfunction
--- /dev/null
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON - Le Mans Université
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function r = %spb_c_s(a, b)
+ // [sparse bool, double]
+ r = [bool2s(a) , sparse(b)]
+endfunction
--- /dev/null
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON - Le Mans Université
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function r = %spb_c_sp(a, b)
+ // [sparse bool, sparse]
+ r = [bool2s(a) , b]
+endfunction
--- /dev/null
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON - Le Mans Université
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function r = %spb_f_s(a, b)
+ // [sparse bool ; double]
+ r = [ bool2s(a) ; sparse(b) ]
+endfunction
--- /dev/null
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) Samuel GOUGEON - Le Mans Université
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function r = %spb_f_sp(a, b)
+ // [sparse bool ; sparse]
+ r = [bool2s(a) ; b]
+endfunction
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2018 - 2020 - Samuel GOUGEON
+// Copyright (C) 2018-2020 - Samuel GOUGEON - Le Mans Université
//
// This file is distributed under the same license as the Scilab package.
// =============================================================================
assert_checkequal([iconvert(d,it) ; d], [d ; d]);
end
end
+
+// -------------------------------------------------
+// A boolean and a double, at least one being sparse
+// -------------------------------------------------
+s = [2 -1 3 ; 4 0 2];
+sp = sparse(s);
+b = [%T %F %F ; %F %T %T];
+spb = sparse(b);
+objects = list(s, sp, b, spb);
+for a = objects
+ for b = objects
+ if (or(type(a)==[1 5]) & or(type(b)==[1 5])) | ..
+ (or(type(a)==[4 6]) & or(type(b)==[4 6])) | ..
+ (~issparse(a) & ~issparse(b))
+ continue
+ end
+ c = [a b];
+ if or(type(a)==[1 5]) | or(type(b)==[1 5])
+ assert_checkequal(type(c), 5);
+ else
+ assert_checkequal(type(c), 6);
+ end
+ assert_checkequal(size(c), [2 6]);
+
+ c = [a ; b];
+ if or(type(a)==[1 5]) | or(type(b)==[1 5])
+ assert_checkequal(type(c), 5);
+ else
+ assert_checkequal(type(c), 6);
+ end
+ assert_checkequal(size(c), [4 3]);
+ end
+end