⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xclgetdata.m

📁 PLS_Toolbox是用于故障检测与诊断方面的matlab工具箱
💻 M
字号:
function xmat = xclgetdata(filename,datarange)
%XCLGETDATA extracts a matrix from an Excel spreadsheet
%  Inputs are (filename) a text string containing the
%  file name of the OPEN Excel spreadsheet and (datarange)
%  a text string containing the range in the spreadsheet
%  that contains the data matrix in row/column format. 
%  The output (xmat) is the MATLAB matrix.
%
%Note: This function only works on a PC and the spreadsheet
%  must be open in Office 97 or higher. For Mac see XLGETRANGE.
%
%Example: to get a table of data from the range C2 to T25
%         from the open workbook 'book1.xls':
%     data = xclgetdata('book1.xls','r2c3:r25c20')
%
%I/O: xmat = xclgetdata(filename,datarange);
%
%See Also: AREADR1, XCLPUTDATA, XCLREADR

%Copyright Eigenvector Research, Inc. 1999 - 2000
%nbg 1/99
%nbg 11/00 added XCLREADR

chan  = ddeinit('excel',filename);
xmat  = ddereq(chan,datarange);
rc    = ddeterm(chan);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -