Displaying a description
8 次查看(过去 30 天)
显示 更早的评论
How do I write a description for a program such that when I chose an option, the description of the program pop-out in the command window?
This question is pretty vague, I hope it's not too confusing
3 个评论
Fangjun Jiang
2011-10-23
Okay then, can you show your code? I don't understand "but it said the input was too long." Here is an example.
Str=['This is a description',char(10)];
LongStr=repmat(Str,1,100);
clc;
disp(LongStr);
Is it long enough?
回答(1 个)
the cyclist
2011-10-23
I believe you want the msgbox() command. Try this:
>> msgbox('This is the description that you wrote')
Read "doc msgbox" for details.
1 个评论
Walter Roberson
2011-10-23
That wouldn't "pop out in the command window".
Seems to me that a simple function that does a bunch of fprintf() or disp() is all that is needed, and then to tie that function in as a callback to whatever the poster means by "choose an option".
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!