Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Maxima : how to assign to a column (or submatrix) of a matrix

323 views
Skip to first unread message

jara...@skynet.be

unread,
Aug 19, 2013, 2:46:58 PM8/19/13
to
Unfortunately, the functions 'col' and 'submatrix' cannot be used on the LHS of an assignment.
How can I assign to a column of submatrix without using a loop or building the matrix from scratch?
Many thanks for a hint,
Helmut

clicl...@freenet.de

unread,
Aug 23, 2013, 5:24:32 AM8/23/13
to

jara...@skynet.be schrieb:
>
> Unfortunately, the functions 'col' and 'submatrix' cannot be used on
> the LHS of an assignment.
> How can I assign to a column of submatrix without using a loop or
> building the matrix from scratch?

I would have liked reading the answer to your problem on this group, but
the Maxima gurus appear to be out of town. Please consider using the
dedicated Maxima mailing list instead, at

<http://www.math.utexas.edu/pipermail/maxima/>.

Martin.

Nasser M. Abbasi

unread,
Aug 23, 2013, 8:01:19 AM8/23/13
to
fyi, OP, there is also a maxima forum at stackoverflow

http://stackoverflow.com/questions/tagged/maxima

(ps. Usenet news groups are dying away, and most activities
now are on forums such as the above)

--Nasser

Richard Fateman

unread,
Aug 23, 2013, 12:14:42 PM8/23/13
to
Stackoverflow and similar systems (stackexchange)
hijack your information
(or misinformation), and monetize it by putting advertisements
on the pages. The managers of these systems, while
probably well-intentioned, may interject their own values
(and ignorance) indirectly through choices of indexing,
filtering, etc.

Then there are the proprietary systems like community.wolfram.com
and mapleprimes.com where the bias is mostly explicit: how to use
system X to do Y.
And the specialized newsgroups like comp.soft-sys.math.mathematica
which are censored to remove not only spam but any messages that
mention rivals to Mathematica.

So where does that leave you? Clearly naifs will post questions anywhere.
Where do knowledgeable people look at questions and answer them?

Maybe diffusion of this sort means that people who know the answers
will not bother.

The content of sci.math.symbolic has, at various times, been so diluted
that contributors have stopped reading it. Is this what will happen
with these "new" forums?

I think the answer to the question of how to assign to columns and rows
was answered promptly when posted to the maxima mailing list -- a
technology probably even old that this uucp-style newsgroup.

So...


Telling people to use stackoverflow ... is that a good idea?

RJF

PS. Maxima could be altered to allow more alternatives to the
lhs of an assignment, or another assignment-style operation
could be defined. In either case the technology needed to
recognize the "location" meanings of col and row
could be modeled on the Common Lisp setf macro.

Or you might consider why you need to do something more efficiently
than a loop. Are you in a hurry? Are you using large matrices
in Maxima? Seriously?

Axel Vogt

unread,
Aug 23, 2013, 3:04:25 PM8/23/13
to
On 23.08.2013 18:14, Richard Fateman wrote:
> Stackoverflow and similar systems (stackexchange)
> hijack your information
> (or misinformation), and monetize it by putting advertisements
> on the pages. The managers of these systems, while
> probably well-intentioned, may interject their own values
> (and ignorance) indirectly through choices of indexing,
> filtering, etc.
...

Using Firefox and some settings I do not see any advertisements.

clicl...@freenet.de

unread,
Aug 23, 2013, 7:46:13 PM8/23/13
to

Richard Fateman schrieb:
>
> PS. Maxima could be altered to allow more alternatives to the
> lhs of an assignment, or another assignment-style operation
> could be defined. In either case the technology needed to
> recognize the "location" meanings of col and row
> could be modeled on the Common Lisp setf macro.
>
> Or you might consider why you need to do something more efficiently
> than a loop. Are you in a hurry? Are you using large matrices
> in Maxima? Seriously?
>

A good reason for such a submatrix selection facility would be to avoid
the more complicated and more error-prone loop coding in interactive
one-off experiments - for me the dominant type of use of a CAS.

Derive has such a facility. On the lhs of assignments you can write
mymatrix SUB SUB 3 to select the third column vector (not a matrix), and
mymatrix SUB [i1, ..., i2] SUB SUB [j1, ..., jm] to select an arbitrary
submatrix. Normal indexing is done via mymatrix SUB i SUB j, where SUB i
selects the i-th row vector and SUB j the j-th element of this vector.
This indexing scheme can be nested to arbitrary depth. In the above,
[m,...,n] is short for VECTOR(k,k,m,n) which expands to [m, m+1, m+2,
..., n-1, n]; arbitrary index vectors like [3,2,1] or [2,4,6] may be
used in its place. Vectors and matrices need not be defined separately
(e.g. for fixed-size storage allocation), they are created on computing
them, or on writing them explicitly like [[1,0],[0,1]].

Martin.
0 new messages