第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > matlab里excel汉字怎么显示 [求助]matlab如何导入excel中的汉字 求助~~~

matlab里excel汉字怎么显示 [求助]matlab如何导入excel中的汉字 求助~~~

时间:2022-10-23 01:08:39

相关推荐

matlab里excel汉字怎么显示 [求助]matlab如何导入excel中的汉字 求助~~~

第一种方法,你可以使用xlsread函数来读取excel中的数据

第二种方法,就是把字符转化为数字,使用函数str2num

xlsread的使用

EXAMPLES:

1. Default operation:

NUMERIC = xlsread(FILE);

[NUMERIC,TXT]=xlsread(FILE);

[NUMERIC,TXT,RAW]=xlsread(FILE);

2. Get data from the default region:

NUMERIC = xlsread('c:\matlab\work\myspreadsheet')

3. Get data from the used area in a sheet other than the first sheet:

NUMERIC = xlsread('c:\matlab\work\myspreadsheet','sheet2')

4. Get data from a named sheet:

NUMERIC = xlsread('c:\matlab\work\myspreadsheet','NBData')

5. Get data from a specified region in a sheet other than the first

sheet:

NUMERIC = xlsread('c:\matlab\work\myspreadsheet','sheet2','a2:j5')

6. Get data from a specified region in a named sheet:

NUMERIC = xlsread('c:\matlab\work\myspreadsheet','NBData','a2:j5')

7. Get data from a region in a sheet specified by index:

NUMERIC = xlsread('c:\matlab\work\myspreadsheet',2,'a2:j5')

8. Interactive region selection:

NUMERIC = xlsread('c:\matlab\work\myspreadsheet',-1);

You have to select the active region and the active sheet in the

EXCEL window that will come into focus. Click OK in the Data

Selection Dialog when you have finished selecting the active region.

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。