What is the exact reason of this error? I am not getting it. Any help will be appreciated.

5 次查看(过去 30 天)
parameters
simout
tout
 
xlswrite('s101_n00.xlsx',[tout,simout,parameters],'Sheet1','A2')
col_headers={​​​​​'time','Ci0','Ti0','Tci0','Ci','Ti','C','T','Qc','Tci','Tc','b','a'}​​​​​
xlswrite('s101_n00.xlsx',col_headers,'Sheet1','A1')
Error: Invalid text character. Check for unsupported symbol, invisible character, or pasting of
non-ASCII characters.
  1 个评论
Mathieu NOE
Mathieu NOE 2021-10-18
hello
I could not make it work untill I rewrotte the line with col_headers in my own command window with
maybe an issue with a copy / paste that created an issue ??
col_headers = {'time','Ci0','Ti0','Tci0','Ci','Ti','C','T','Qc','Tci','Tc','b','a'}
xlswrite('s101_n00.xlsx',col_headers,'Sheet1','A1')

请先登录,再进行评论。

回答(1 个)

Dave B
Dave B 2021-10-18
As @Mathieu NOE points out, there's something a little strange in your col_headers = line. This line has a bunch of extra characters, specifically a bunch of characters marked with Unicode 8203 (Zero Width Space). You can't see these characters, (because they have zero width), but if you try to arrow around through them in the editor or command window you might notice your cursor getting 'stuck'.
col_headers_line="col_headers={​​​​​'time','Ci0','Ti0','Tci0','Ci','Ti','C','T','Qc','Tci','Tc','b','a'}​​​​​"
col_headers_line = "col_headers={​​​​​'time','Ci0','Ti0','Tci0','Ci','Ti','C','T','Qc','Tci','Tc','b','a'}​​​​​"
double(col_headers_line{:})==8203 % or skip the ==8203 in MATLAB desktop and they'll jump right out at you
ans = 1×91 logical array
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by