- To: mathgroup at smc.vnet.net
- Subject: [mg92310] SparseArray
- From: Uli Wuerfel <uli.wuerfel at fmf.uni-freiburg.de>
- Date: Sat, 27 Sep 2008 06:51:00 -0400 (EDT)
I want to create a SparseArray with the elements being zero except for the diagonal elements and their direct neighbours. For those, I would like to assign them a value from another list, depending on the index i.
The code is like this:
Here delx is a very simple list, but later I would like to do the same with a list with varying elements.
The reason is that I would like to have a non-constant
grid spacing in order to solve a differential equation with the SparseArray and using LinearSolve.
This works well as long as I assign constants to the SparseArray-item. If I try to assign values from a list to the SparseArray-item, it does not work.
Can you help?
Prev by Date:
Re: How to do symbolic matrix manipulations
Next by Date:
Previous by thread:
Re: copying a variable
Next by thread: