Setting static text box's string
显示 更早的评论
Hi everybody
I create a gui and a after static text box which is named frameText.I want to change it's string with this code .
set(handles.frameText , 'String' , 'abcdefgh' );
But an error occurs.
??? Subscript indices must either be real positive integers or logicals.
What is the reason for this? Thanks for help...
采纳的回答
更多回答(3 个)
Jan
2011-7-14
1 个投票
You have created a variable call "set". Then the shown line does not call the built-in command SET anymore, but tries to use the string parameters as indices.
Paulo Silva
2011-7-14
0 个投票
Are you really sure that the error is caused by that line of code? I'm not :)
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!