matlab中怎样调用表格,求助如何在matlab中调用excel表格中的数据

function actx_excel

% Copyright 2005 The MathWorks, Inc.

% Use Excel as a data server for MATLAB

% Start data server

startServ1

% Scope variables from startServ1 to main function

exl; exlWkbk; exlData;

% Start graph server

startServ2

% Scope variables from startServ2 to main function

exl2; exlWkbk2; wb; Shapes;

%% Extract column data

% Time:1, inptAil:2, inptEle:3, inptRud:4, respAil:5, respEle:6, respRud:7

for ii = 1:size(exlData,2)

matData(:,ii) = reshape([exlData{2:end,ii}],size(exlData(2:end,ii)));

lBoxList{ii} = [exlData{1,ii}];

end

lbs = '';

tme = matData(:,1); % Time data

%% ------------ GUI layout ---------------

% Use system background color for GUI components

panelColor = get(0,'DefaultUicontrolBackgroundColor');

%% Set up the figure and defaults

f = figure('Units','characters',...

'Position',[30 30 120 35],...

'Color',panelColor,...

'HandleVisibility','callback',...

'IntegerHandle','off',...

'Renderer','painters',...

'Toolbar','figure',...

'NumberTitle','off',...

'Name','Excel Plotter',...

'PaperPositionMode','auto',...

'DeleteFcn',@deleteFig);

%% Create the bottom uipanel

botPanel = uipanel('BorderType','etchedin',...

'BackgroundColor',panelColor,...

'Units','characters',...

'Position',[1/20 1/20 119.9 8],

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值