Format of xlsread output
1 次查看(过去 30 天)
显示 更早的评论
Hello all,
A simple question: if I were to read an excel workbook's cells, one of them which contained a literal string in this format:
{ISM_PKExteriorScanReq = NTI_PKExteriorScanReq}
[ISM_PEnable && ISM_PKExteriorScanReq==2]
{SCH_Fob_Found=x;
SCH_Finished=ISTRUE;
SCH_callTEA=ISTRUE;}
The output for the particular cell would like identical to what it read. Is there any special characters or something that is hidden in this text though (such as newlines)? So, for example, if there were hidden characters, using a regexp function:
match = regexp(text, regexptranslate('escape', text), 'match');
match would be an empty cell array. In my case, match is an empty cell array.
0 个评论
回答(1 个)
Walter Roberson
2017-5-17
If that is a single cell, then Yes, there would have to be characters other than the obvious, or else the output formatting would be different.
You can find the unexpected characters using
badchar_mask = ~isstrprop(text, 'print');
text(badchar_mask) + 0
2 个评论
Walter Roberson
2017-5-18
Are you indicating that the output of text(badchar_mask) + 0 was empty?
Could you post double() of each of the strings?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!