matlab-figure

Multiple plots coombine and concatenate in matlab [closed]

老子叫甜甜 提交于 2019-11-30 10:10:20
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago . The problem is that I have a for loop as follows: for i=1:(rx * tx) for j=1:(rx * tx) eval(sprintf('t_%d_%d_t = corrcoef(m_a%d_abs, m_b%d_abs)', pairs(i), pairs(j), pairs(i), pairs(j))); eval(sprintf('t_%d_%d = t_%d_%d_t(1, 2)', pairs(i), pairs(j), pairs(i), pairs(j))); if(eval(sprintf('t_%d_%d',

Is it possible to get around MATLAB's limitation on font embedding in vector format files?

自古美人都是妖i 提交于 2019-11-30 09:58:55
According to the MATLAB manual, when you save a figure using print or by choosing file|save , if you choose the painters renderer and save to PDF or EPS vector formats, all fonts get substituted . Is there a way to get around this limitation? Whenever I output a figure, whether I use print or export_fig , the fonts get substituted, and so they no longer match the fonts in the document that I plan on putting the figure into. I would prefer to keep them in a vector format, because I use LaTeX and so I want to be able to use the same figures in my documents as in my beamer presentations and have

Cylinder with filled top and bottom in matlab

☆樱花仙子☆ 提交于 2019-11-30 09:26:16
问题 I am trying to create a "solid" cylinder that has a filled top and bottom to it. I know that there is the function cylinder(r) that creates one, though it does not have a top and bottom circle to "close it". I did some research and can't seem to find a function that does this. I have found this: http://www.mathworks.com/help/symbolic/mupad_ref/plot-cylinder.html though it is mupad code, and I don't know how to call that function from matlab (from my .m file). Once again, I have done some

How to adjust the distance between the y-label and the y-axis in Matlab?

二次信任 提交于 2019-11-30 08:38:59
问题 In Matlab, if we do not rotate the y-label that contains several letters, the label may overlap with the tick numbers or even the y-axis. We can increase the distance between the y-label and the y-axis in the following way: plot(A, B); y=ylabel('xxx', 'rot', 0); % do not rotate the y label set(y, 'position', get(y,'position')-[0.1,0,0]); % shift the y label to the left by 0.1 However, a problem is that if we change axis([0 1 0 25]) to axis([0 10 0 25]) , the distance between the y-label and

Save exact image output from imagesc in matlab

时光总嘲笑我的痴心妄想 提交于 2019-11-30 07:21:46
Hi , I want to save this image produced from imagesc(magic(3)) , the exact rainbow representation, is it possible? Thanks. This question might look like a duplicate , but it is not . I looked at the solution to the similar question at this site , but it did not satisfy me . I have looked into the Matlab help center and the close answer that I got was this one , at the bottom of http://goo.gl/p907wR To save the figure as a file (don't matter how it was created), one should do: saveas(figureHandle,'filename','format') where figureHandle could be the gcf handle, which means: get current figure .

How to save MATLAB figure as JPEG using saveas() without the image coming off badly?

流过昼夜 提交于 2019-11-30 06:03:22
In a MATLAB function I am writing, I am generating a figure. The figure is displayed when the function is executed. I need to save the figure as a JPEG image. To do that, I could do File->Save As in the figure window that displays the figure. But I'd like to automate this. I've tried to do that using the saveas() function. The problem is that the resulting image is undesirable. Here are the images for a demo problem to show you what I mean: JPEG image saved manually using File->Save As in the MATLAB figure window: JPEG Image saved using saveas() function (notice that the plots aren't as nice

Have Matlab figures docked by default

蹲街弑〆低调 提交于 2019-11-30 01:17:42
问题 In Matlab, it is possible to have figure windows docked in the main window. If there are several figures, each of them appears in a different "tab". Is it possible to set up the system so that all figure windows will be created docked by default? 回答1: To dock figures by default, try calling: set(0,'DefaultFigureWindowStyle','docked') at the beginning 回答2: The point 'n' click alternative: Click Desktop -> Figures . Click the arrow underneath the cross in the top-right (tooltip is 'Dock Figures

How do I add two legends to a single plot in MATLAB?

雨燕双飞 提交于 2019-11-29 20:35:02
问题 I'd like to add two legends to a plot in MATLAB. How can I do this? 回答1: You could create a second superimposed axis, with a legend of its own (in a different location of course). EDIT: Here is a quick example: %# create some plot with a legend hAx(1) = axes(); hLine(1) = plot(1:10, 'Parent',hAx(1)); set(hAx(1), 'Box','off') legend(hLine(1), 'line') %# copy the axis hAx(2) = copyobj(hAx(1),gcf); delete( get(hAx(2),'Children') ) %# delete its children hLine(2) = plot(sin(1:10), 'Color','r',

Disable plots in Matlab

时间秒杀一切 提交于 2019-11-29 17:49:25
问题 I have some programs written in Matlab that I need to run several times for some reasons (debugging, testing with different input, etc...) But, there are a lot's of graphs that are plotted by the programs and its various functions such that everytime I run the program, I have to wait for all the graphs to be displayed, which is very annoying and time consuming (especially when you are working with a small laptop). After the program is executed, I close them with a close all . So my question

save GUI figure in matlab

為{幸葍}努か 提交于 2019-11-29 17:27:17
let us consider following program for graphical user interface function varargout = quadratic(varargin) % QUADRATIC MATLAB code for quadratic.fig % QUADRATIC, by itself, creates a new QUADRATIC or raises the existing % singleton*. % % H = QUADRATIC returns the handle to a new QUADRATIC or the handle to % the existing singleton*. % % QUADRATIC('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in QUADRATIC.M with the given input arguments. % % QUADRATIC('Property','Value',...) creates a new QUADRATIC or raises the % existing singleton*. Starting from the left,