Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Removing array dimension
Date: Tue, 30 Apr 2013 23:24:05 -0500
Organization: Aioe.org NNTP Server
Lines: 27
Message-ID: <klq5d3$gtu$1@speranza.aioe.org>
References: <klpght$jh1$1@newscl01ah.mathworks.com> <klplip$grr$1@speranza.aioe.org> <klpqvj$fva$1@newscl01ah.mathworks.com> <klq512$gbn$1@speranza.aioe.org>
Reply-To: <HIDDEN>
NNTP-Posting-Host: IcbzAjffnWaq9tw6UJPbag.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
X-Notice: Filtered by postfilter v. 0.8.2
Xref: news.mathworks.com comp.soft-sys.matlab:794656


> EDU>> A(:,:,2:end)=[];
> EDU>> size(A)
> ans =
>        3     3
>
> The above is the same as saying
>
>     squeeze(A);
>

opps, that should be

      squeeze(A(:,:,1));

> To remove the third dimension, and now keep the second page,
> then do
>
> B=A(:,:,2);
> A=B
>

or just B=squeeze(A(:,:,2)) ofcourse..

--Nasser