matlab GUI怎么在figure中显示文字

2024-12-18 03:22:04
推荐回答(4个)
回答(1):

要给你设置的pushbutton编一个回调函数,选中按钮右键找cellback,然后写代码:
a='hello
world';
set(handles.edit1,'string',a);

回答(2):

text函数能加标注

回答(3):

figure

uicontrol('style','pushbutton','units','normalized','position',[0.2 0.2 0.25 0.15],'callback','open filename.m','string','view_file')

回答(4):

利用uicontrol
figure;hax = axes('Units','pixels');surf(peaks);
str={'abc';'fadkjda';'jfaljfa';'flkajfla'};
uicontrol('Style', text','String', str,'Position', [20 340 100 50],);