[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Counting entries in cs-lists
From: |
JokerOne |
Subject: |
Re: Counting entries in cs-lists |
Date: |
Wed, 22 Apr 2015 04:04:26 -0700 (PDT) |
Thanks all for your help.
>>> numel(vertcat([a.b].c))
ans = 5
will even work as a one-liner then.
I will have a closer look to vertcat and hortcat, might be useful for some
tasks.
Also, yes, I guess, I used the wrong term, sorry. What is a(1).b.c called ?
An indexed cs-list? Whatever...
Generally, say f.g.h = 1 is possible, and not a syntax error
>>> f.g.h=1
f =
scalar structure containing the fields:
g =
scalar structure containing the fields:
h = 1
but of course after setting
>>>> a(1).b.c = [1;2];
>>>> a(2).b.c = [3;4;5];
,
a.b.c
IS a syntay error.
Thanks again for you very fast help.
--
View this message in context:
http://octave.1599824.n4.nabble.com/Counting-entries-in-cs-lists-tp4670010p4670013.html
Sent from the Octave - General mailing list archive at Nabble.com.