Path: news.mathworks.com!not-for-mail
From: "Donn Shull" <donn.shull.no_spam@aetoolbox.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: containers.Map
Date: Sat, 10 Oct 2009 13:36:02 +0000 (UTC)
Organization: L &#38; D Engineering LLC
Lines: 16
Message-ID: <haq2k2$5q7$1@fred.mathworks.com>
References: <hap1ij$hk7$1@fred.mathworks.com>
Reply-To: "Donn Shull" <donn.shull.no_spam@aetoolbox.com>
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 1255181762 5959 172.30.248.35 (10 Oct 2009 13:36:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 10 Oct 2009 13:36:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 219306
Xref: news.mathworks.com comp.soft-sys.matlab:576387


"Tim B" <jinli_m@yahoo.com> wrote in message <hap1ij$hk7$1@fred.mathworks.com>...
> Hello,
> 
> I used a Map to hold a time series data. How could I plot this data? I was told that values method only returns array of the value. How could change the cell into a value data? Thanks!

Hi Tim,

If x is your containers.Map object then:

plot(cell2mat(x.keys), cell2mat(x.values))

should work.

Hope this helps,

Donn