是否可以在MATLAB图形标签中显示unicode? [英] Is it possible to display unicode in MATLAB plot labels?

查看:163
本文介绍了是否可以在MATLAB图形标签中显示unicode?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打电话给

xlabel( 'Time (μs)' );  

但这只是在情节上显示一个问号而已.反正有没有显示unicode?

But that just shows up with a question mark on the plot. Is there anyway to have the unicode show up?

推荐答案

对于您的特定示例,您可以使用TeX \ LaTeX格式获得所需的显示:

For your specific example, you can get the display you want using TeX\LaTeX formatting:

xlabel('Time ({\mu}s)');

对于显示Unicode字符的更一般的情况,如果您知道字符代码您可以使用函数 构建一个字符串,例如所以:

For the more general case of displaying Unicode characters, if you know the code for your character you can convert the decimal value for the code to a character using the function char and build a string like so:

xlabel(['Time (' char(181) 's)']);  % Same results as above

这篇关于是否可以在MATLAB图形标签中显示unicode?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆