Thread Subject: containers.Map

Subject: containers.Map

From: Tim B

Date: 10 Oct, 2009 04:12:03

Message: 1 of 2

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!

Subject: containers.Map

From: Donn Shull

Date: 10 Oct, 2009 13:36:02

Message: 2 of 2

"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

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com