matlab-figure

How to display coordinates and use ginput

折月煮酒 提交于 2019-12-01 05:59:20
I cannot seem to get my image to display the coordinates of my mouse cursor, and also use ginput to store points at the same time. I currently am trying the following: MriHotrod = imread('Image.bmp'); Fig = figure('Name','BobDole'),... imshow(Image, 'InitialMagnification', 250) axis on impixelinfo Image_1 = ginput(4) close BobDole The ginput still works, but the impixelinfo stays constant Pixel Info = (X, Y) Pixel Value I am aware of some methods of getting around this, but they involve functions. This seems like a rather simple problem that can avoid the use of functions. If you type edit

Matlab - how to draw pixels on a black full screen?

前提是你 提交于 2019-12-01 05:46:41
I want matlab to show me a full screen, all black, and to be able to set pixels on it. Is it even possible? You can't totally do that using pure MATLAB code. On Windows, I tried different combinations, but the taskbar will still be on top (the one with the Start button): %# 1) sz = get(0, 'ScreenSize'); figure('Menubar','none', 'WindowStyle','modal', ... 'Units','pixels', 'Position', [0 0 sz(3) sz(4)]) %# 2) figure('Menubar','none', 'Units','normalized', 'Position',[0 0 1 1]) %# 3) hFig = figure('Menubar','none', 'Units','normalized', 'Position',[0 0 1 1]); set(hFig, 'Units','pixels') p = get

How to deselect cells in uitable / how to disable cell selection highlighting?

和自甴很熟 提交于 2019-12-01 04:25:35
I created the following uitable : actually every single row is an indpendent uitable , so the figure shown contains 5 uitables besides the header. Why I'm doing that was the issue of my last question , resulting in the shown table. Fully executable code you can find in the answer here (or a minimal example below). Solutions using a general GUI are also there, but it would blow up the code too much, and actually it just seems to be a kind of bug. It can be seen that everytime I jump to the next row, therefore to another uitable, the last selection remains highlighted, which looks stupid, though

Matlab - how to draw pixels on a black full screen?

天大地大妈咪最大 提交于 2019-12-01 03:34:13
问题 I want matlab to show me a full screen, all black, and to be able to set pixels on it. Is it even possible? 回答1: You can't totally do that using pure MATLAB code. On Windows, I tried different combinations, but the taskbar will still be on top (the one with the Start button): %# 1) sz = get(0, 'ScreenSize'); figure('Menubar','none', 'WindowStyle','modal', ... 'Units','pixels', 'Position', [0 0 sz(3) sz(4)]) %# 2) figure('Menubar','none', 'Units','normalized', 'Position',[0 0 1 1]) %# 3) hFig

How to display coordinates and use ginput

删除回忆录丶 提交于 2019-12-01 03:23:09
问题 I cannot seem to get my image to display the coordinates of my mouse cursor, and also use ginput to store points at the same time. I currently am trying the following: MriHotrod = imread('Image.bmp'); Fig = figure('Name','BobDole'),... imshow(Image, 'InitialMagnification', 250) axis on impixelinfo Image_1 = ginput(4) close BobDole The ginput still works, but the impixelinfo stays constant Pixel Info = (X, Y) Pixel Value I am aware of some methods of getting around this, but they involve

How to deselect cells in uitable / how to disable cell selection highlighting?

做~自己de王妃 提交于 2019-12-01 02:48:52
问题 I created the following uitable : actually every single row is an indpendent uitable , so the figure shown contains 5 uitables besides the header. Why I'm doing that was the issue of my last question, resulting in the shown table. Fully executable code you can find in the answer here (or a minimal example below). Solutions using a general GUI are also there, but it would blow up the code too much, and actually it just seems to be a kind of bug. It can be seen that everytime I jump to the next

make filled shapes move in MATLAB

冷暖自知 提交于 2019-12-01 01:15:58
I have the following statement for drawing filled rectangler and cirle shapes in matlab. What I have to add for those statement only to make shapes between start point and target point for each without collision. fill([9.5 9.5 11.5 11.5 ],[12.6 14.6 14.6 12.6],'r'); %rectangler shape hold on r=1; color=[1 0 0]; t=linspace(0,2*pi); fill(15+r*cos(t),8+r*sin(t),color); %circle shape grid on Example with a rectangle. The trick is to gradually modify the object properties, in this case its 'Vertices' origin_x = [9.5 9.5 11.5 11.5 ]; %// initial coordinates of vertices origin_y = [12.6 14.6 14.6 12

Adjusting size of plot in Matlab so that graph does not get cut off by edge of plot window

99封情书 提交于 2019-12-01 01:05:12
I've created a plot in Matlab, but unfortunately the side of the plot is cut off by the plotting window. Here is the code that I've used to create the plot: % create a plot with dots and with bold sides point = num(:, 1); depth = num(:, 2); hfig = plot(point, depth, '-s', 'Color', 'k', 'MarkerFaceColor', 'k', 'MarkerEdgeColor', 'k', 'MarkerSize', 10); % make the outside of the graph bold set(gca, 'LineWidth', axis_size); set(gca,'FontSize', ticksize, 'FontName', fontname); set(gca, 'Position', [0.2 0.2 0.8 0.4]) xlabel('Point Number') ylabel('Depth (cm)') Here is the output: Notice how the

presenting motion of random walkers in matlab

99封情书 提交于 2019-12-01 00:55:16
I have simulated some random walkers. I used plot(xb,yb,'b--o') to show particles in each step. I saw a code in below link with beautiful particles with tail which moves in a blur way. Is there a way which I could my random walkers the same as the walkers in the link in mat lab? Could anyone tell me which should I use instead of the plot function I used? beautiful particles The code I tried: clear all close all lbox=20; %random fluctuation eta = (2.*pi).*.1; vs=0.02; n=200; birdl=[1:n]; axis([0 lbox 0 lbox]) axis('square') hold on xb=rand(n,1).*lbox; %first possition yb=rand(n,1).*lbox; %first

Saving figure with current file name in MatLab

纵饮孤独 提交于 2019-11-30 23:48:24
I have a script that pulls one file at a time from my current working directory and plots specified information. I would like to save each of the plots as a jpeg (tiff is okay too) with the name of the file it's plotting. I have about 3000 files, so I am looking for an automated way to do this. I thought this might work if placed at the end of the for-loop: saveas(gcf, ' ',jpg) I am not sure what to put in quotations for the file name. Example The plot of the data in data1.mat should be saved in the file data1.jpeg If loadedFileName is the name (and perhaps) path of the file that you just