Graphics

Graphical commands of LME for Pocket PC are borrowed from Sysquake. There are low-level commands for basic shapes as well as high-level commands for more specialized plots:

Low-level commands
Low-level commands add simple shapes such as lines, marks, polygons, circles and images. With them, you can display virtually everything you want. Arguments of these commands are such that it is very easy to work globally with matrices without computing each value sequentially in a loop.
High-level commands
High-level commands perform some computation of their own to process their arguments before displaying the result. This has two benefits: first, the code is simpler, more compact, and faster to develop. Second, command execution is faster, because the additional processing is not interpreted by LME, but implemented as native machine code. The information related to interactive manipulation is often easier to use, too. Most of these functions are related to automatic control and signal processing.

Here is the list of these commands:

bar
barh
bodemag
bodephase
button
circle
clf
contour
dbodemag
dbodephase
dimpulse
dinitial
dlsim
dnichols
dnyquist
drawnow
dsigma
dstep
erlocus
fplot
hgrid
hstep
image
impulse
initial
label
legend
line
lsim
ngrid
nyquist
nyquist
plot
plotoption
plotroots
popupmenu
pushbutton
rlocus
scale
scalefactor
settabs
sgrid
sigma
step
subplot
text
title
zgrid

clf

Clear the figure.

Syntax

clf

Description

clf erases the figure and resets its scale.

drawnow

Immediate drawing of the plots.

Syntax

drawnow

Description

drawnow makes LME immediately draws the result of graphical commands which were executed before. Graphics are buffered to provide optimal performances. drawnow may be useful for basic animations or for benchmarks.

Example

tic;for i=1:100;clf;step(1,1:4);drawnow;end;toc
  2.2212

See also

clf

subplot

Manage subplots.

Syntax

subplot(m, n, i)
subplot(mni)
subplot mni

Description

The subplot function specifies the layout of subplots and where the graphical output produced by the commands which follow will be displayed. It can be used from the command-line interface (directly or indirectly in functions) or in SQ scripts. SQ files rely on a different mechanism, where each subplot is defined with a different draw handler and may be displayed on demand.

subplot(m,n,i), subplot(mni) with a three-digits number, or subplot mni all set an m-by-n grid layout and select the i:th subplot, with i between 1 for the top-left subplot and m*n for the bottom-right subplot. subplot should be executed before each subplot with the same values of m and n.

Example

Four subplots in a 2-by-2 layout:

subplot 221
title('Top-left');
step(1,[1,2,3,4]);
subplot 222
title('Top-right');
plot(rand(10));
subplot 223
title('Bottom-left');
scale equal
nyquist(1,1:4);
subplot 224
title('Last one');
contour(randn(10));

See also

title


Copyright 2005-2008, Calerga.
All rights reserved.