MATLAB怎么读取带表头的xlsx(有实例代码)

54 篇文章 93 订阅 ¥9.90 ¥99.00
本文介绍了在MATLAB中如何正确读取带有表头的xlsx文件,通过设置'PreserveVariableNames'选项避免读取错误。提供了一个示例代码,只需将filename替换为实际xlsx文件名。
摘要由CSDN通过智能技术生成

其实很简单,读取前设置’PreserveVariableNames’就可以了,否则会报错如下:

Warning: Column headers from the file were modified to make them valid MATLAB
identifiers before creating variable names for the table. The original column
headers are saved in the VariableDescriptions property.
Set 'PreserveVariableNames' to true to use the original column headers as table
variable names. 

示例代码

注意filename改成你的xlsx的名字即可。

filename 
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值