help-octave
[Top][All Lists]
Advanced

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

How to extract all variables from a structure


From: Terry Duell
Subject: How to extract all variables from a structure
Date: Thu, 28 Mar 2013 20:36:54 +1100
User-agent: Opera Mail/12.14 (Linux)

Hello All,

I have a nested structure...

s =

  scalar structure containing the fields:

    data =

      scalar structure containing the fields:

        w1 =  237.60
        w2 =  244.20
        w3 =  150
        w4 =  3000
        r1 =  14.500
        r2 =  14.500
         .
         .
         .
        and so on

I see that I can use the function "getfield" to extract the structure "data" from the structure "s". Is there a neat way of extracting all the variables from "data", (ie. so that they are simply unstructured variables) without having to separately reference each?

Cheers,
--
Regards,
Terry Duell


reply via email to

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