[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to extract all variables from a structure
From: |
Andreas Weber |
Subject: |
Re: How to extract all variables from a structure |
Date: |
Thu, 28 Mar 2013 11:26:45 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 |
Am 28.03.2013 10:36, schrieb Terry Duell:
> I have a nested structure...
> ...
> Is there a neat way of extracting all the variables from "data",
s.data.w1=237.6;
s.data.r1=14.5;
s.data.r2=14.23;
c=struct2cell(s.data)
c =
{
[1,1] = 237.60
[2,1] = 14.500
[3,1] = 14.230
}
d=cell2mat(c)
d =
237.600
14.500
14.230
HTH, Andy