Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: inv(rand(6,6,2)) question
Date: Mon, 24 Nov 2008 21:23:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 15
Message-ID: <ggf5vm$ctn$1@fred.mathworks.com>
References: <ggf2da$898$1@fred.mathworks.com> <ggf2oi$dfo$1@fred.mathworks.com> <ggf39d$mlm$1@fred.mathworks.com> <ggf51m$pdq$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1227561782 13239 172.30.248.35 (24 Nov 2008 21:23:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 24 Nov 2008 21:23:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1376919
Xref: news.mathworks.com comp.soft-sys.matlab:502940


"Alistair Templeton" <bigalt2000@yahoo.com> wrote in message <ggf51m$pdq$1@fred.mathworks.com>...
> 
> > 
> > I also applied squeeze, but it does not work as well.  My problem is why? since inside the loop, rand(3,3,1) is gives a square matrix
> > 
> > for i=1:2
> > x=squeeze(inv(rand(3,3,i))); 
> > end
> > 
> > 
> 
> what about when i=2?

Point well taken. sorry I wasn't thinking clearly. So what would be the proper way to find the inv in this case?