help-octave
[Top][All Lists]
Advanced

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

Re: struct weirdness


From: Sergei Steshenko
Subject: Re: struct weirdness
Date: Sat, 25 Aug 2012 16:09:17 -0700 (PDT)


--- On Sat, 8/25/12, Jordi Gutiérrez Hermoso <address@hidden> wrote:

> From: Jordi Gutiérrez Hermoso <address@hidden>
> Subject: Re: struct weirdness
> To: "Sergei Steshenko" <address@hidden>
> Cc: "John W. Eaton" <address@hidden>, "address@hidden" <address@hidden>
> Date: Saturday, August 25, 2012, 2:49 PM
> On 25 August 2012 15:33, Sergei
> Steshenko <address@hidden>
> wrote:
> > where is a conceptual problem ?
> 
> I don't believe you've ever presented evidence that you
> understand
> what a cs-list is. I apologise if you do, but they are a
> confusing
> Octave type, and they seem to be at the core of your
> misunderstanding.
> 
> Also, it's not fair to compare Octave with a real
> programming
> language. Octave's language sucks. I freely admit so myself.
> You
> should throw out most of your expectations from real
> programming
> languages when using Octave. Octave's intended audience
> generally are
> people who don't know any other programming language, so
> they are more
> accepting of all of Octave's shortcomings.
> 
> - Jordi G. H.
> 

"Octave's language sucks. I freely admit so myself." - and that's why I am 
suggesting to implement 'consistent_struct' - it will behave intuitively and 
won't interfere with Matlab compatibility.

"Octave's intended audience generally are people who don't know any other 
programming language" - what, people doing scientific computations are computer 
languages illiterate ?

"I don't believe you've ever presented evidence that you understand what a 
cs-list is" - in the context I do not need that understanding.

In the example I've given 'size' works where I expect it to work:

"
octave:1> foo.cellarray = {"Peter", "Paul", "Mary"};
octave:2> foo.vector = [1 2 3 4];
octave:3> foo.matrix = [5 6 7; 8 9 10];
octave:4> foo.scalar_value = 123;
octave:5> foo
foo =

  scalar structure containing the fields:

    cellarray = 
    {
      [1,1] = Peter
      [1,2] = Paul
      [1,3] = Mary
    }
    vector =

       1   2   3   4

    matrix =

        5    6    7
        8    9   10

    scalar_value =  123

octave:6> size(foo.vector)
ans =

   1   4

octave:7> size(foo.matrix)
ans =

   2   3

octave:8> size(foo.scalar_value)
ans =

   1   1

octave:9> 
".

Regards,
  Sergei.



reply via email to

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