Hi every one . I want to make drag and drop box. Could you give me advices about that. My target is: I took text files from our experiments and than i want to drag and drop it into command window.After that i want to control my calculations , plot diagrams etc... As you expected i have too many Experiment results and i want to make my calculations succesively thats why i need drag and drop box. how can i create it ?and how can i link Buttons with m files.

6 commentaires

Michael Haderlein
Michael Haderlein le 5 Fév 2015
From your question, it doesn't become clear why you need a drag and drop box. Actually, what do you mean with "drag and drop box"? I mean, this is an action rather than a user control element.
If you want to read files, you can open them by various built-in functions depending on the content of the files.
If you really want to create a graphical user interface, you can start with GUIDE. I personally don't like it but it might be a start. My recommendation however is to just write a script/function which reads, processes, and displays your data.
cemsi888
cemsi888 le 5 Fév 2015
cemsi888
cemsi888 le 5 Fév 2015
I have already written script but as you can see on my Picture , i want to create 5 Buttons and with These Buttons i want to control my process. for example if i push the button read files matlab must read all the files that i have already dropped in to command window.( i will create my command window with Buttons)..
Michael Haderlein
Michael Haderlein le 5 Fév 2015
From your answer I suppose what you describe as command window is not the Command Window of the Matlab desktop? What might come close to your needs is uigetfile(). This opens the standard file select dialog. I don't know a real drag and drop solution. Maybe here you can find something.
cemsi888
cemsi888 le 5 Fév 2015
yes you are rihgt it is not matlab command window.and do you know how can i add Status bar in my "COMMAND WINDOW"?
Just create axes at this position and a patch in there. Set xlim to [0 1] and update the xdata of the patch over progress:
figure, ha=axes('xlim',[0 1],'ylim',[0 1],'xtick',[],'ytick',[],'box','on');
hp=patch([0 0 0 0],[0 0 1 1],'r');
for cnt=1:100
set(hp,'xData',[0 cnt/100 cnt/100 0])
pause(.1)
end

Connectez-vous pour commenter.

 Réponse acceptée

Plus de réponses (1)

Xiangrui Li
Xiangrui Li le 28 Juin 2016

1 vote

For anyone who is interested, here is a nice solution with java
-Xiangrui

Catégories

En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by