Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



import data and name variables
Posted:
Apr 17, 2009 1:37 PM


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



