当前位置:网站首页>将数据导入到MATLAB
将数据导入到MATLAB
2022-06-25 06:42:00 【傻童:CPU】
将数据导入到MATLAB
将数据导入到MATLAB中有二种方式。
第一种:直接使用MATLAB读Excel文件
例如
Excel表格
num=xlsread('data1.xlsx','Sheet1','A1:E13');%读入Excel文件
input_train=num(1:8,1:4)';%1到8行,1到4列
output_train=num(1:8,5)';%1到8行,第5列
input_test=num(9:13,1:4)';%9到13行,1到4列
output_test=num(9:13,5)';%9到13行,第5列
其中,num:只是一个定义的名称而已,你可以把他定义成你所想想要的名称即可,比如:settlement;data1:是你自己给这个excel起的名字;xlsx:这是excel的文件后缀,如果你是更早的版本可能是xls,注意甄别即可;Sheet1:这个是你的数据在excel的第几页里面;A1:E13:这个是你的数据在excel所处的全部范围。num(1:8,1:4):1:8的意思是第一行到第八行,1:4是第一列到第四列。()'表示将括号内的数据进行转置。
第二种方式
先在主页中点击,新建变量;然后修改变量名;然后粘贴数据。
然后在命令行窗口输入命令,保存数据

边栏推荐
- C control refresh
- 消息中间件之ActiveMQ的基本使用
- 微信小程序开通客服消息功能开发
- Getting started with OpenMP
- OpenMP入门
- Access to foreign lead domain name mailbox
- [distillation] pointdistiller: structured knowledge distillationwards efficient and compact 3D detection
- Usememo simulation usecallback
- Share the process requirements for single-layer flexible circuit board
- Runtime - Methods member variable, cache member variable
猜你喜欢

使用报文和波形记录分析仪RoyalScope的帧统计功能排查CAN总线偶发性故障

环网冗余式CAN/光纤转换器的CAN光端机在消防火灾联网报警系统中的应用

Manufacturing process of PCB 2021-10-11

Basic use of ActiveMQ in Message Oriented Middleware

Do you know why the PCB produces tin beads? 2021-09-30

realsense d455 semantic_slam实现语义八叉树建图

How to resize an image in C #

无“米”,也能煮“饭”利用“点云智绘”反演机载LiDAR林下缺失地面点攻略

函数模板_类模板

npm install 报错 : gyp ERR! configure error
随机推荐
Understand the reasons for impedance matching of PCB circuit board 2021-10-07
How much do you know about electronic components on PCB?
Modular programming of wireless transmission module nRF905 controlled by single chip microcomputer
Summary of small problems in smartbugs installation
饮食干预减轻癌症治疗相关症状和毒性
@The difference between resource and @autowired annotation, why recommend @resource?
挖掘微生物暗物质——新思路
Insert and sort the linked list [dummy unified operation + broken chain core - passive node]
Five causes of PCB board deformation and six solutions 2021-10-08
无“米”,也能煮“饭”利用“点云智绘”反演机载LiDAR林下缺失地面点攻略
C reads XML on the web
Elk + filebeat log parsing, log warehousing optimization, logstash filter configuration attribute
c# winform panel自定义图片和文字
Analysis and utilization of Microsoft Office Word remote command execution vulnerability (cve-2022-30190)
年后求职找B端产品经理?差点把自己坑惨了......
useMemo模拟useCallback
Bicubic difference
Kinsing双平台挖矿家族病毒分析
AttributeError: ‘Upsample‘ object has no attribute ‘recompute_ scale_ factor‘
C#获取exe的版本号-文件版本and程序集版本