Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: struct prealocation
Date: Tue, 6 Nov 2012 10:32:08 +0000 (UTC)
Organization: NRI Rez
Lines: 9
Message-ID: <k7aov7$al6$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1352197928 10918 172.30.248.45 (6 Nov 2012 10:32:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 6 Nov 2012 10:32:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1322323
Xref: news.mathworks.com comp.soft-sys.matlab:782142

How can I prealocate structure to eliminate allocation overhead during computation?

Example:
s ... size 1x10 struct
s.x ... size 1x1  double
s.y ... size 1x1 double
s.z ... size 1x1 double

Thanks in advance, Michal