Convert char to cell array

조회 수: 3 (최근 30일)
harsh
harsh 2012년 9월 11일
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
Walter Roberson
Walter Roberson 2012년 9월 12일
You did not indicate what numeric value you want to have the strings convert to.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by