Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: import data and name variables
Replies: 1   Last Post: Apr 17, 2009 4:49 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Andrea Asoni

Posts: 10
Registered: 4/15/09
import data and name variables
Posted: Apr 17, 2009 1:37 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,

if i import data using the Import Wizard, I end up with three thing in my workspace: a matrix with the data (called data) and two strings of cells with the names of the variables I imported from .txt (colheaders and textdata).

now i can create variables in matlab saying for example var1=data(:,1) and so on.

is there a way however to do this using the information in colheaders and textdata?
something like "name the first variable using the name in the first cell of colheaders/textdata and assign to such variable the values in the first column of data"...

thanks



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.