[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #66514] spdiags does not "broadcast" elements
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #66514] spdiags does not "broadcast" elements over selected diagonals |
Date: |
Tue, 3 Dec 2024 07:38:59 -0500 (EST) |
Follow-up Comment #2, bug #66514 (group octave):
Similar issue if the first argument is a scalar.
In Octave 9.2.0:
>> n=9; Z = sparse(n,n); A = spdiags([1], -1:1, Z)
A =
Compressed Column Sparse (rows = 9, cols = 9, nnz = 1 [1.2%])
(2, 1) -> 1
In Matlab R2024b:
>> n=9; Z = sparse(n,n); A = spdiags([1], -1:1, Z); full(A)
ans =
1 1 0 0 0 0 0 0 0
1 1 1 0 0 0 0 0 0
0 1 1 1 0 0 0 0 0
0 0 1 1 1 0 0 0 0
0 0 0 1 1 1 0 0 0
0 0 0 0 1 1 1 0 0
0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 1 1 1
0 0 0 0 0 0 0 1 1
>>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66514>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature