MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Applying rules to SparseArray


Hi!
Let's say I've a matrix like this one:
m=SparseArray[ {{1, 1} -> 1, {1, 2} ->2, {3, 2} -> x}, {3, 3} ];
which looks like this in MatrixForm:
1 2 0
0 0 0
0 x 0
where 'x' is a variable coefficient. Is there any way to apply a rule
{x->1} to this array? ( m/.{x->1} doesn't work )

Thanks in advance


  • Prev by Date: Re: Question on Map or Apply
  • Next by Date: Re: Picture
  • Previous by thread: Re: OT: simplex method
  • Next by thread: Re: Applying rules to SparseArray