Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: constructing a 3D array (using permute?)
Date: Tue, 22 Jul 2008 17:45:06 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <g656b2$4o1$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1216748706 4865 172.30.248.37 (22 Jul 2008 17:45:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 22 Jul 2008 17:45:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1338633
Xref: news.mathworks.com comp.soft-sys.matlab:481039



I have some code as follows:

 a=rand(50,16)
 b=pi*a.^2

 f=1:100
 w=2*pi*f

 c=sqrt((w'.*b)/(pi))


This returns an error stating that the matrix dimensions
must agree as would be expected because w' is [100 1] and b
is [50 16].

My question is, how can I assemble a 3D array of size [100
16 50] to be stored as c, from w' and b? 

I think permute is needed but can't get it to do what I want.
Hopefully you can help. Thanks.