# \#sparsearrays

**URL:** https://discourse.julialang.org/tag/sparsearrays/1409.md?page=1

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 2

---

## [Replace diagonals in existing spdiagm array](https://discourse.julialang.org/t/replace-diagonals-in-existing-spdiagm-array/102202)

<div class="topic-metadata">

**Author:** [@dalarev](https://discourse.julialang.org/u/dalarev)\
**Replies:** 2\
**Last updated:** [July 31, 2023, 4:41pm UTC](https://discourse.julialang.org/t/replace-diagonals-in-existing-spdiagm-array/102202 "2023-07-31T16:41:50Z")

</div>

Hi, wondering if there is an equivalent to the MATLAB method spdiags(Bin, d, A), where the diagonals in A are replaced by those in d with the columns of Bin. As far as I can tell, spdiagsm does not support a method that…

[Previous page](https://discourse.julialang.org/tag/sparsearrays/1409.md?match_all_tags=true&tags%5B%5D=sparsearrays)
