Wednesday, November 14, 2007

[Matlab] Create a figure with specified location and size

Source

Matlab Help, figure

Syntax

rect = [left bottom width height];
% The unit of rect is pixel by default.
% left = the distance between the left of the figure and the left of the screen
% bottom = the distnace between the bottom of the figure and the bottom of the screen
figure( 'Position', rect );

Code

Wednesday, November 07, 2007

[Matlab] Specify a figure to plot

Source

Matlab Help

Syntax

set(0,'CurrentFigure',figure_handle);

Code

h1 = figure;
h2 = figure;
set(0,'CurrentFigure',h1);
plot( x1, y1 );
set(0,'CurrentFigure',h2);
plot( x2, y2 );