From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to assign multiple structure elements at once
Date: Sat, 17 Nov 2012 08:38:13 +0000 (UTC)
Organization: Marquette University
Lines: 4
Message-ID: <k87idl$h5o$>
References: <k83bfk$1rf$> <k83cl8$6ft$> <k859fd$1fr$> <k85d1j$d4g$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1353141493 17592 (17 Nov 2012 08:38:13 GMT)
NNTP-Posting-Date: Sat, 17 Nov 2012 08:38:13 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2023544
Xref: comp.soft-sys.matlab:782963

> It sounds preferable to use a 10xN matrix where N is the number of sampling times to record the data and put it in NaN at hours where a particular bus is not working. Not only is this much easier to index/access, but notice also that that would ensure that your samples are always synchronized if a bus breaks for some period of samples and then starts working again. That's much harder to do if you simply don't record the activity of broken buses.

Thanks for your help. It looks like it is better to change the whole data structure to make it easier and faster the recording process. But it would be nice to have this functionality to simultenously record a data to structure array like the way I was trying to implement. Because in my real case I have thousands of buses and tens of fields to fill in data, over time as the matrices become huge the memory fails to process that data.