Path: news.mathworks.com!not-for-mail
From: "sujata " <sujatagp@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: cell array
Date: Fri, 23 Oct 2009 08:22:01 +0000 (UTC)
Organization: AEGON Nederland N.V.
Lines: 20
Message-ID: <hbrp39$me3$1@fred.mathworks.com>
Reply-To: "sujata " <sujatagp@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1256286121 22979 172.30.248.38 (23 Oct 2009 08:22:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 23 Oct 2009 08:22:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1683215
Xref: news.mathworks.com comp.soft-sys.matlab:579514


I have a 5 by 2 cell array that is only filled with numbers. Something like this:
Z = 
   [ 1.6168]    [ 0.8652]
    [ 0.5724]    [ 0.2323]
    [ 2.5916]    [ 2.6805]
    [-5.1700]    [      0]
    [ 1.4836]    [ 0.4542]
    [-0.1367]    [      0]
    [ 2.5100]    [ 2.9110]
           []           []
    [ 1.7531]    [ 1.7531]
    [-0.6462]    [-0.6462]

but i want to take the difference between these two columns. Since it is an cell array this is not possible to simply do Z(:,1)-Z(:,2).

I could use a for loop but i want to avoid using that. I also looked in the documentation for cell conversions but so far no luck. 

Does anyone know (if) there is an alternative way to do this?

Thanks