help-octave
[Top][All Lists]
Advanced

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

Looping deeper in structure elements


From: Falk Dechent
Subject: Looping deeper in structure elements
Date: Wed, 22 Nov 2006 09:03:09 +0100
User-agent: KMail/1.9.5

Hi everybody!
I'm new using octave (and never used mathlab) and I have several questions. 
Will slpit them in two posts.

zeug.cm0=1;

for [val,key] = zeug
        key=10 * val;
endfor
zeug.cm0 #result =1


for [val,key] = zeug
        val=10 * val;
endfor
zeug.cm0 #result =1


for [val,key] = zeug
        eval(strcat('zeug.' , key , '=10 *val;' ));
endfor
zeug.cm0 #result =10

Well is there an other method do this my goal is something like this:
zeug.cm0.x=4;

for [val,key] = zeug
        for [val,key] = val
               val=10 * val;
        endfor
endfor
zeug.cm0.x=40;

Ideas I hope someone can help
Falk

(octave 2.9.9)

Attachment: pgp1ntLqhWX7r.pgp
Description: PGP signature


reply via email to

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