Convert char to cell array

4 visualizzazioni (ultimi 30 giorni)
harsh
harsh il 11 Set 2012
I am importing a spreadsheet into Matlab that has over 15918 vectors. I have one column, column 3, that has characters populated into each of the rows. These variables are designated as "tag" and "vendorname." These two variables are shown in the variable editor as <15918x1 cell>, I need to convert it to <15918x1 double> for both. How do I do that?
Second, I want to create a GUI that allows me to enter a generic "tag" and a generic "vendorname" that can be found in the database, and produce order date quantity and cost.
Below are the variables I have defined and the script I have used.
tag
tday
vendorname
[num, txt]=xlsread('Valve History.xls');
tday=txt(2:end, 4);
tday=datestr(datenum(tday, 'mm/dd/yyyy'), 'yyyymmdd');
tday=str2double(cellstr(tday));
tag=txt(2:end, 3);
vendorname=txt(2:end, 8);
  1 Commento
Walter Roberson
Walter Roberson il 12 Set 2012
You did not indicate what numeric value you want to have the strings convert to.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by