文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > 计算机软件及应用 > matlab读取excel
侵权投诉

matlab读取excel

matlab读取excel数据方法

Activesheet = Excel.Activesheet;

% Put a MATLAB array into Excel

A = [1 2; 3 4];

ActivesheetRange = get(Activesheet,'Range','A1:B2');

set(ActivesheetRange, 'Value', A);

% Get back a range. It will be a cell array,

% since the cell range can

% contain different types of data.

Range = get(Activesheet, 'Range', 'A1:B2');

B = Range.value;

% Convert to a double matrix. The cell array must contain only scalars.

B = reshape([B{:}], size(B));

% Now save the workbook

invoke(Workbook, 'SaveAs', 'myfile.xls');

% To avoid saving the workbook and being prompted to do so,

% uncomment the following code.

% Workbook.Saved = 1;

% invoke(Workbook, 'Close');

% Quit Excel

invoke(Excel, 'Quit');

% End process

delete(Excel);

There are several options for connecting MATLAB with Excel. For an example that shows how to connect MATLAB with Excel using Excel Link, please refer to the following URL:

doc.guandang.net

For an example that shows how to connect MATLAB with Excel using DDE, please refer to the following URL:

doc.guandang.net

For information on how to use the XLSREAD function to read .xls files, please refer to the following URL:

doc.guandang.net

上一页第6页

你可能喜欢

热门文档

相关文档

  • 关于matlab读取excel以及处理

    在许多时候我们要借助于 matlab 读取 excel 的 内容进行处理, 内容进行处理,一下是一种常用的处理方法文件本质上就是一个二维矩阵, office 的表格文件也就是 xls...

  • matlab读取txt和excel

    matlab读取txt和excel_数学_自然科学_专业资料。matlab读取txt和excelText 的读写 1.读文本文件 fid=fopen('matlab3.txt','r') %我已把 txt 放入 matlab 默认...

  • matlab读取excel数据

    matlab读取excel数据_计算机软件及应用_IT/计算机_专业资料 暂无评价0人阅读0次下载举报文档 matlab读取excel数据_计算机软件及应用_IT/计算机_专业资料。1.用 ...

  • Matlab 如何读取 Excel 表格数据

    Matlab 如何读取 Excel 表格数据_理学_高等教育_教育专区。Excel 表格数据? 上一篇: 在 VC++程序中输出空心文字 Matlab 如何读取 Excel 表格数据 下一篇: My ANN...

  • Excel 读入Matlab

    ? 1.利用 matlab 从 excel 中读取数据使用:xlsread 命令、uiimport 可视化导入命令 exp:excel 表的文件名为 book1.xls,存放在 E:\ 读取命令:data = xlsread(...

  • MATLAB读取TXT excle

    MATLAB读取TXT excle_电脑基础知识_IT/计算机_专业资料。matlab教程文本读写matlab 中读取 excel 的 xls 文件 1.使用函数 xlsread 读取单个文件 (1)num=xlsread(...

  • MATLAB读取excel数据求助

    MATLAB 读取 excel 数据求助 想从 excel 中读取一个这样的矩阵 0 9 inf 3 inf 9 0 2 inf 7 inf 2 0 2 4 3 inf 2 0 inf inf 7 4 inf 0 可是用...

  • matlab与excel

    原理是这样的,当用户系统安装有 Excel 时,MATLAB 创建 Excel 服务器,通过服务器接口读取数 据。当用户系统没有安装 Excel 或 MATLAB 不能访问 COM 服务器时,...

  • MATLAB如何导入excel数据

    MATLAB如何导入excel数据_计算机软件及应用_IT/计算机_专业资料。下面我就通过实例介绍一下 MATLAB 如何导入 excel 数据。 1. 读取 sheet1 中的所有数据 我们以 03...

  • Matlab如何在Excel中提取数据

    clc;clear; dname=input (' 数据文件名:\n') ; %读入数据 Excel→Matlab A=xlsread (dname) ; 3 实验数据处理 - 64 - DATABASE AND INFORMATION MANAGEMENT...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email