MATLAB学习(二)读写xls文件

>> N=xlsread('DRINK.xls','DRINK','A1:D8')

N =

  207.2000    3.3000   15.5000    2.8000
   36.8000    5.9000   12.9000    3.3000
   72.2000    7.3000    8.2000    2.4000
   36.7000    0.4000   10.5000    4.0000
  121.7000    4.1000    9.2000    3.5000
   89.1000    4.0000   10.2000    3.3000
  146.7000    4.3000    9.7000    1.8000

 

>> A=ones(2,4)

A =

     1     1     1     1
     1     1     1     1

>> xlswrite('tmp.xls',A,'sheet1','A1:D2')
>> B=xlsread('tmp.xls','sheet1','A1:D2')

B =

     1     1     1     1
     1     1     1     1

 

posted on 2019-07-08 10:21  蔡军帅  阅读(1538)  评论(0编辑  收藏  举报