查看单个帖子
旧 2019-12-10, 20:30   #1
poster
高级会员
 
注册日期: 2019-11-21
帖子: 3,006
声望力: 66
poster 正向着好的方向发展
帖子 MATLAB-使用字符串设置图形标题

我正在编写一个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
poster 当前离线   回复时引用此帖