フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How can I open a pre-made figure window by selecting from listbox in GUI?

1 回表示 (過去 30 日間)
Haksun Lee
Haksun Lee 2012 年 5 月 22 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hello! I am struggling to figure this out for 3 days.. What I am wondering is this. I have a main program and many subprograms. And I want to open subprogram by selecting name of the subprogram from list box and clicking open button. this is my code: packet_list=cellstr(get(handles.listbox1,'String')); temp1=packet_list{get(handles.listbox1, 'Value')}; figure(temp1); please save me from this deep swamp :) Have a nice day.

回答 (1 件)

Jan
Jan 2012 年 5 月 22 日
I cannot guess, what "opening a subprogram" means. What is the contents of the list stored in listbox1? What do you assume as result of "figure(temp1)" and what do you get? Perhaps you want "feval(temp1)"?
  2 件のコメント
Haksun Lee
Haksun Lee 2012 年 5 月 22 日
Oh.. thank you !
My program operates corrently with your recommendation, feval(temp1)..!
First, what I wanted to do was that I choose a sub-program(sub-window) name from the listbox1, and click button, then sub-program(sub-window) will be opened.
So, "figure(temp1)" means that open sub-program named "temp1"(=sub-program name) which was made in advance),
Anyway, your comment was quite helpful!!
Have a nice day! :)
Jan
Jan 2012 年 5 月 22 日
If you "accept" an answer, which solves your problem, other readers wanting to help can skip this thread and save their time.

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by