[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Re: is octave compatible with matlab 5.2?

From: Jonathan King
Subject: Re: Re: Re: is octave compatible with matlab 5.2?
Date: Tue, 23 Mar 1999 15:17:23 -0800

>On 23-Mar-1999, Jonathan King <address@hidden> wrote:
>| Interesting.  Well, it's easy enough to implement car, cdr, and
>| append (I just did it...).
>There is already an append function (at least in my sources).  I don't
>have car or cdr though.

Whoops!  Looks like I was checking for that in my non-bleeding edge
version of octave (I had both running, duh.)  Yeah, append is there.
What did you call cons?  Nevermind; I'll use the source this time. :-)
And, yeah, is_list is there to (and that's exactly what I checked
for in the wrong Octave).

In the mean time, I'll check for "cons", "flatten", "map", "fold"
and the like.  And how to fields of list items in place when those
items are structs...

bar(2)=4;        # works

foo=list(a,a)    # works!
nth(foo,1).b     # also works, returning 3
nth(foo,1).b = 4 # nope; (predictably?) creates a variable "nth" :-(
foo(1).b = 4     # nope; clobbers foo.
foo(1).b         # nope; "can't perform structure reference
                         operations for list type
temp=nth(foo,1); # one handed juggling does work,
temp.b= 4;       # but if this were a huge matrix, the copying cost
foo(1)=temp;     # would be annoying, especially if I were just
                 # changing one entry.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]