matlab-guide

Show CPU cores utilization in MATLAB

家住魔仙堡 提交于 2019-12-04 11:20:24
Is anyway (any function etc) to show CPU cores utilization in MATLAB in a GUI likes that we have in Task Manager of windows (Performance Tab)? Thanks. To my knowledge, there are no Matlab function which can access the system properties at the level of the process usage. To get this information one must call external classes. A search on internet can fetch you some Java classes which can query the process properties. The advantage of the Java approach is it is more likely to be cross-platform. For windows user, there are still 2 ways of querying these information: by direct call to windows API

Drag and drop files in Matlab GUI

拜拜、爱过 提交于 2019-12-04 08:39:21
问题 I am trying to find a way to use drag and drop in my matlab GUI. The closest I've found is this. However, I would like the result to look like this: When a file has been dropped, all I need is the path of the file and a call to my load function. All suggestions are much appreciated! 回答1: This submission by Maarten van der Seijs on the file exchange seems to solve it. It creates a callback function which can be coupled to java swing GUI components, as shown in the attached demo. It uses a java

Function that executes on GUI closing in matlab

ぃ、小莉子 提交于 2019-12-04 06:56:36
I am creating a GUI in matlab using guide. It's non-blocking (not calling uiwait ). When the gui window is closed, I would like to execute some clean up code. Is there an gui_ClosingFcn callback I should define in analogy to the gui_OpeningFcn template that guide creates for me? Figure windows have a 'DeleteFcn' property , which defines a callback function that will run when the window is closed/deleted. You could potentially use that to do your clean-up. Figure windows have a CloseRequestFcn property, which defines a callback function that will run when the window is closed (before deleting

Scaleable, draggable box on plots that can select data

纵然是瞬间 提交于 2019-12-04 03:39:39
Here's the setup: I've got a graphical plot of data, and I'm trying to find if it's feasible to try to put a box on the figure that can be moved and changed in width and return some values like percentage of and area under the curve. It looks something like this: Any suggestions on where to start? My feeling was that it might be doable using a more GUI'd interface versus a standard plot. Andrey Rubshtein I would start with imrect . It is draggable, and you can add callbacks to it. (Taken directly from MATLAB help) figure, imshow('cameraman.tif'); h = imrect(gca, [10 10 100 100]);

Drawing with mouse on the GUI in matlab

亡梦爱人 提交于 2019-12-03 15:50:24
I want to have a program in matlab with GUI, at run the program, user can draw anythings with mouse on the axes in GUI, and i want to saving created image in a matrix. how can i to do this? Finally i find a good code and i have changed some parts for customizing for me. with this way, user can drawing anythings in the axes with mouse : function userDraw(handles) %F=figure; %setptr(F,'eraser'); %a custom cursor just for fun A=handles.axesUserDraw; % axesUserDraw is tag of my axes set(A,'buttondownfcn',@start_pencil) function start_pencil(src,eventdata) coords=get(src,'currentpoint'); %since

How to display a scrollable grid of images in matlab GUI

♀尐吖头ヾ 提交于 2019-12-03 07:48:48
How can i display a scrollable grid of images in matlab GUI? I want something similar to what is shown below This stackoverflow post describes a way of displaying images in a uitable by setting the 'String' property to an HTML code pointing to an image. But this requires me to save the images to disk which is not an option i would like as these displays are fired up dynamically. It would also be nice, if i could add a checkbox inside each image so the user can select a subset of them. You can use this tool. In the gui, you should be able to scroll through. But to have title below every image

Drag and drop files in Matlab GUI

怎甘沉沦 提交于 2019-12-03 04:22:12
I am trying to find a way to use drag and drop in my matlab GUI. The closest I've found is this . However, I would like the result to look like this: When a file has been dropped, all I need is the path of the file and a call to my load function. All suggestions are much appreciated! This submission by Maarten van der Seijs on the file exchange seems to solve it. It creates a callback function which can be coupled to java swing GUI components, as shown in the attached demo. It uses a java class, which is a thin wrapper around java.awt.dnd.DropTarget : import java.awt.dnd.*; import java.awt

How to merge two files into one text file?

跟風遠走 提交于 2019-12-02 11:59:05
I am trying to merge two text output file into one text file . file 1: fin=fopen('d://box1.txt','wt'); fprintf(fin,' Hello \n'); file 2: fin=fopen('d://box2.txt','wt'); fprintf(fin,'welcome \n'); Any thoughts? I don't think there is a matlab way of doing it easily. But you can use system commands: Windows: system(type a.txt b.txt >ab.txt) Linux: system(cat a.txt b.txt >ab.txt) Dont forget to put the path in the files if they are not in your current directory! This works: fin=fopen('D:\box1.txt','wt'); fprintf(fin,' Hello \n'); fclose(fin) fin=fopen('D:\box2.txt','wt'); fprintf(fin,'welcome \n'

When I run guide in matlab it opens a blank all gray window. Whats going on?

橙三吉。 提交于 2019-12-02 00:21:44
问题 When I run guide in Matlab, the window that opens is completely grayed out with a title "GUIDE quick start". I am running R2012b in Ubuntu 12.04.2 LTS. Has anyone else run into this problem? UPDATE 1 So I just discovered that if I press enter on that first blank grey window then it opens the Layout Editor window and everything seems to be fine. So I am guessing that on that first screen there is just an OK button (which I cannot see) so when I press enter it is like clicking on the OK button.

When I run guide in matlab it opens a blank all gray window. Whats going on?

[亡魂溺海] 提交于 2019-12-01 21:51:06
When I run guide in Matlab, the window that opens is completely grayed out with a title "GUIDE quick start". I am running R2012b in Ubuntu 12.04.2 LTS. Has anyone else run into this problem? UPDATE 1 So I just discovered that if I press enter on that first blank grey window then it opens the Layout Editor window and everything seems to be fine. So I am guessing that on that first screen there is just an OK button (which I cannot see) so when I press enter it is like clicking on the OK button. UPDATE 2 I built a quick GUI and there are issues. I can create axes and buttons and sliders on the