Path: news.mathworks.com!not-for-mail
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$1@newscl01ah.mathworks.com>
References: <k83bfk$1rf$1@newscl01ah.mathworks.com> <k83cl8$6ft$1@newscl01ah.mathworks.com> <k859fd$1fr$1@newscl01ah.mathworks.com> <k85d1j$d4g$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-01-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1353141493 17592 172.30.248.46 (17 Nov 2012 08:38:13 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 17 Nov 2012 08:38:13 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2023544
Xref: news.mathworks.com 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.