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


Groups > comp.soft-sys.math.mathematica > #6914

Re: A matrix element specified by a vector?

From Sseziwa Mukasa <mukasa@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: A matrix element specified by a vector?
Date 2011-12-03 10:09 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jbcsfu$bvs$1@smc.vnet.net> (permalink)
References <201112021221.HAA01882@smc.vnet.net>

Show all headers | View raw


On Dec 2, 2011, at 7:21 AM, Ralph Dratman wrote:

> I am wondering if there is a more compact way to express the following idea:
>
> myMatrix[[   myVector[[1]],  myVector[[2]]   ]]  =  myScalar
>
> This keeps coming up. Did I miss the quick and easy way to do it? Of
> course it looks even uglier in 3 dimensions.

myMatrix[[Sequence@@myVector]] = myScalar

Regards,
	Sseziwa=

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: A matrix element specified by a vector? Sseziwa Mukasa <mukasa@gmail.com> - 2011-12-03 10:09 +0000

csiph-web