How can I open an .m script from the GUI panel in a new Matlab editor window?

8 views (last 30 days)
Hello, I am making a program for university with a simple graphical interface. I would like a new normal Matlab window with the script open in it to open after pressing the "Edit data" button. Then I can change something, save the script and use another button to run it. I was looking for answers in the Internet, but I don't even know if it is possible.
I will be grateful for your response!

Accepted Answer

Voss
Voss on 18 Jun 2022
Does this work?
function edit_data_Callback(src,evt)
% "Edit data" button's Callback function
file_name = 'my_script.m'; % whatever the script is called
edit(file_name);
end

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!