help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting a character matrix out of a cell array "column"?


From: forkandwait
Subject: Getting a character matrix out of a cell array "column"?
Date: Wed, 10 Mar 2010 14:52:19 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Hi all,

So I read in a csv file with two columns, the first being, say, the name of a 
person the second her height, along with a header row ("name,height").

stuff = csv2cell('blah.csv')

To get the column of heights sans header, I do this:

h = [stuff{2:end,2}]'

h is now:

1.8
1.8
1.9

etc.

How do I get a similar thing for the text column?  I don't mind each row being 
truncated to a certain pre-determined column width, though having the max width 
calculated would be better.  Thus

names:  

Mary
Frances
Cecilia

etc

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]