Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
columns as vectors option grayed out in Import Wizard

Subject: columns as vectors option grayed out in Import Wizard

From: Jay

Date: 22 Oct, 2009 08:14:19

Message: 1 of 2

I'm new to Matlab and generally to running something without a GUI, and am trying to import data from an excel spreadsheet just using the Import Wizard. I run Matlab on Leopard on a Macbook, and am using a Windows version of Excel run on my VMWare Fusion PC on the same computer.

I would like to import the spreadsheet with the column headers as vectors, but the option "Create vectors for each column using column names" is grayed out (as is the option for rows). The same happens when I save my excel spreadsheet as a text file. Just because of inertia, I would like to be able to continue to enter data into Excel before I import it into Matlab, so it would be really helpful if I could import columns as vectors.

My only option at present is to import the textdata and data as variables, which seems like an unnecessary decoupling for what I'm doing, because some of the data is text.

Why are the options I need grayed out?

Subject: columns as vectors option grayed out in Import Wizard

From: Jay

Date: 22 Oct, 2009 11:27:03

Message: 2 of 2

working around this. Used :
[ndata, headertext] = xlsread('filename.xls')

Am parsing the column and row headers using for loops:

Example for rows:
for n = 2:57
newvector{n} = headertext {n, 1}
end
end

In the end, I have a matrix with numerical data and two vectors representing the column headings and row names. I haven't figured out how to deal with non-numerical data yet.

Tags for this Thread

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.

Contact us