登录论坛

查看完整版本 : MATLAB-使用字符串设置图形标题


poster
2019-12-10, 20:30
我正在编写一个MATLAB程序,该程序读取用户的标题以在图形上进行设置...

t = input('Please enter a title for the graph: ', 's'); 然后,我想将情节的标题设置为t 。我似乎无法正常工作...

title(t) %# returns ??? Index exceeds matrix dimensions. 非常感谢您的帮助!



回答:

确保在您的会话中没有名为title变量,该变量掩盖了title()函数

禄 whos Name Size Bytes Class Attributes t 1x1 2 char title 1x1 8 double