help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

accumdim with sparse output


From: Nir Krakauer
Subject: accumdim with sparse output
Date: Fri, 25 Dec 2020 19:44:51 -0500

Is it possible to keep the output of accumdim sparse, similar to
accumarray with issparse=true? If not, is there a way to use
accumarray to get the same result?


I'm thinking of an application like

n = 1E3;
S = sprand (n, n, 1E-3);
inds = repmat(1:(n/2), 1, 2);
Snew = accumdim(inds, accumdim(inds, S, 1, [], @max), 2, [], @max);
#should be sparse



reply via email to

[Prev in Thread] Current Thread [Next in Thread]