What happens when I call the ␇ character in MATLAB

别说谁变了你拦得住时间么 提交于 2019-12-02 04:22:33

The character you entered is just another Unicode character outside the range that the MATLAB command prompt (and possibly even the editor) knows how to display. Just because it represents the "symbol for bel" doesn't mean it has any special significance or would play a sound when entered (no more than other musical symbols like: or 🎻)

Of course you can always have it saved in a regular string and display it in a GUI window:

% The default on Windows is 'windows-1252'
feature('DefaultCharacterSet','UTF-8')

c = char(9223);
uicontrol('style','text', 'units','normalized', 'position',[0 0 1 1], ...
    'string',['char = ' c], 'FontName','Arial Unicode MS', 'FontSize',72)

or even get its encoding in say UTF-8:

>> cellstr(dec2hex(unicode2native(c,'UTF-8')))
ans = 
    'E2'
    '90'
    '87'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!