writecell( [.... -inf inf ...] gives 65535 and 65535 in Excel both for -inf and +inf
13 次查看(过去 30 天)
显示 更早的评论
table2cell(ToperLow)
ans =
1×5 cell array
{[650]} {[-Inf]} {[-Inf]} {[-Inf]} {[500]}
>> xx = table2cell(ToperLow)
xx =
1×5 cell array
{[650]} {[-Inf]} {[-Inf]} {[-Inf]} {[500]}
writecell( xx, 'test.xls', 'Sheet', 'sheet1', 'UseExcel', false )
Resulting cells in Excel is +65535 instead of - 65535???
650 65535 65535 65535 500
3 个评论
dpb
2020-8-18
For some purposes, maybe...a string in the column instead of numeric may break import and return as cellstr() though...not convenient.
回答(1 个)
Maadhav Akula
2020-8-20
Hi,
I believe this is how Excel treats Inf and -Inf in a cell, as @Binbin Qi mentioned one workaround would be to write them as strings as mentioned in the following post:
Hope this Helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Export to MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!