From: Markthomas on 24 Apr 2010 22:06 "Markthomas " <cutonem(a)clarkson.edu> wrote in message <hr0476$86u$1(a)fred.mathworks.com>... > I have a structure labeled Gr_4e10 which have the following data inside: > > Gr_4e10.Q > Gr_4e10.Ar > > and so forth > > i also have a structure called Gr_5e10 which looks the same as above: > > Gr_5e10.Q > Gr_5e10.Ar > > How can i combine these under one structure called DATA? > for instance I want it to look like: > > DATA.Gr_4e10 > DATA.Gr_5e10 > > Thanks > MT
From: Steven Lord on 25 Apr 2010 23:44 "Markthomas " <cutonem(a)clarkson.edu> wrote in message news:hr0476$86u$1(a)fred.mathworks.com... >I have a structure labeled Gr_4e10 which have the following data inside: > > Gr_4e10.Q > Gr_4e10.Ar > > and so forth > > i also have a structure called Gr_5e10 which looks the same as above: > > Gr_5e10.Q > Gr_5e10.Ar > > How can i combine these under one structure called DATA? > for instance I want it to look like: > > DATA.Gr_4e10 > DATA.Gr_5e10 Then do so. DATA.Gr_4e10 = Gr_4e10; DATA.Gr_5e10 = Gr_5e10; % or DATA = struct('Gr_4e10', Gr_4e10, 'Gr_5e10', Gr_5e10); -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|
Pages: 1 Prev: Creating Complex Structure Next: Accessing a Structure in a loop |