Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9341 > unrolled thread

Re: Matrix operation

Started byBob Hanlon <hanlonr357@gmail.com>
First post2012-04-01 07:40 +0000
Last post2012-04-01 07:40 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Matrix operation Bob Hanlon <hanlonr357@gmail.com> - 2012-04-01 07:40 +0000

#9341 — Re: Matrix operation

FromBob Hanlon <hanlonr357@gmail.com>
Date2012-04-01 07:40 +0000
SubjectRe: Matrix operation
Message-ID<jl90pu$mrb$1@smc.vnet.net>
s1 = {{0, 4, 3, 6, 1, 0, 0, 30},
   {0, 6, 16, 8, 0, 1, 0, 256},
   {0, 4, 1, 10, 0, 0, 1, 9},
   {1, -2, -4, -3, 0, 0, 0, 0}};

s2 = -s1;

s2 = ReplacePart[s2, 4 -> -s1[[4]] - 4 s1[[3]]];


Bob Hanlon


On Sat, Mar 31, 2012 at 4:45 AM, Andrey Demidov
<andrey.demidov@gmail.com> wrote:
> Hi,
>
> I have a matrix:
>
>>> s1 = {{0, 4, 3, 6, 1, 0, 0, 30}, {0, 6, 16, 8, 0, 1, 0, 256}, {0, 4, 1,
>    10, 0, 0, 1, 9}, {1, -2, -4, -3, 0, 0, 0, 0}}
>
>>> MatrixForm[s1]
>
> Now, I need to get another matrix (s2) where:
>
>   - s2[i, j] = s1[i, j] where i <> 4
>   - s2[i, j] = s1[i, j] + 4 * s1[i - 1, j] where i == 4
>
> What is the best way to get s2 ?
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web