Thread Subject: Ploting String in a diagram

Subject: Ploting String in a diagram

From: Alireza Y.

Date: 23 Nov, 2009 15:29:20

Message: 1 of 2

Hi
I have an excel file which I have imported to Matlab by xlsread.It has three column. One column includes only string data (In Matlab the class of these data is double), and other two columns are numbers. B and C will show the position of points in a diagram, and A are label of the points.
A= [Mt,Nt,Ot]
B=[1,2,3]
C=[10,25.5,30]
when I want to recall value of array A, ans is NaN.
what code should I use to read the element of column A, and plot them in diagram as a label for each point?
Thanks in advance

Subject: Ploting String in a diagram

From: ImageAnalyst

Date: 23 Nov, 2009 21:31:12

Message: 2 of 2

On Nov 23, 10:29 am, "Alireza Y." <bilgi_...@yahoo.com> wrote:
> Hi
> I have an excel file which I have imported to Matlab by xlsread.It has three column.  One column includes only string data (In Matlab the class of these data is double), and other two columns are numbers. B and C will show the position of points in a diagram, and A are label of the points.
> A= [Mt,Nt,Ot]
> B=[1,2,3]
> C=[10,25.5,30]
> when I want to recall value of array A, ans is NaN.
> what code should I use to read the element of column A, and plot them in diagram as a label for each point?
> Thanks in advance

------------------------------------
Did you accept all three return values from xlsread()? Try that.
Once you have the strings, and position, you can use the text()
function to place the k'th label on your plot
text(A{k}, B(k), C(k));
or something like that.

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