In GUI, I have a push button. I want that when this push button is pressed a text file which created before opens automatically without choosing a file..

2 次查看(过去 30 天)
% I have a textfile which name is readme.txt Its directory: C//matlabcodes folder
%In GUI, I also have a push button. When I press this push button, I want to open "readme.txt" automatically.
thanks in advance

采纳的回答

Ravi
Ravi 2013-7-11
In pushbutton callback,
text=fileread('C:\.....\readme.txt');
set(handles.text1,'String',text)
  3 个评论

请先登录,再进行评论。

更多回答(1 个)

Ilham Hardy
Ilham Hardy 2013-7-11
In pushbutton callback:
open('C:\matlabcodes folder\readme.txt')
HTH, IH

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by