Import data from Excel
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I'm trying to input data from Excel by column and when doing it the first data which is suppose to end up in a NaN doesn't appear.
Example:
MTBV = xlsread('G-Score','Active Data','B4:B13');
When I'm inputing it the B4 data which is suppose to be a NaN is ignored by MATLAB. This problem is only with the first data because the other ones are considered as NaN when I input them.
Best regards,
回答(1 个)
Fangjun Jiang
2021-2-1
xlsread() tries to be smart. It tries its best to give you the numerical data so it truncates the leading Nan. Run this to see
[Num,Txt,Raw]=xlsread('G-Score','Active Data','B4:B13')
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!