addcol list bug or feature



Martin,

I am not sure what you find problematic here. To me, this just looks
as Maxima did what you asked it to do (according to the documentation
for addcol). In the first case: addcol(b,a), a is a single list, hence
you are adding one column to b, and that column is made of the
elements of a. In the second case: addcol(b,part(a,1),part(a,2)), you
have a list of two matrices that you want to add, so you will add two
columns to b, part(a,1) and part(a,2), respectively. 

I am not familiar with FoldList, so can't help, sorry. Probably
someone else can help you with that, or you could explain what
FoldList does and we can see waht we can do.

HTH,
Milan

* Martin J. Ott <ottmartin at web.de> [2008-02-13 01:30:16 +0100]:

> Hello everybody,
> 
> I want to create a matrix out of list elements. Therefor I tried addcol, but 
> unfortunately the effect ist not the expected.
> One little example(not my real problem, but contains the same behaviour):
> 
> a:[matrix([1],[2]), matrix([3],[4])];
> b:matrix([0],[0])
> 
> what I did is:
> addcol(b,a)
> 
> but what I want is the effect of:
> addcol(b,part(a,1),part(a,2))
> 
> could anybody tell me, if this is a bug or just a feature, I haven't 
> understood yes?
> 
> By the way; Is there a function in MAXIMA equivalent to FoldList in 
> Mathematica?
> 
> Any suggestions will be welcome.
> 
> Martin
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima

--