Matlab: Eine Kurzübersicht


Matlab starten

Voraussetzung: Account im Sun-Pool (notfalls besorgen im Aquarium 245) In der Umgebungsvariablen MATLABPATH kann der Pfad zu eigenen Matlab-Skripten und Funktionen angegeben werden, wenn diese nicht im Arbeitsverzeichnis liegen. Siehe auch help addpath.

Hilfe



Ausdrücke


Graphik

figure, by itself, creates a new figure window, and returns its handle.

figure(H) makes H the current figure, forces it to become visible, and raises it above all other figures on the screen. If Figure H does not exist, and H is an integer, a new figure is created with handle H.

axes Create axes in arbitrary positions. axes('position', RECT) opens up an axis at the specified location and returns a handle to it. RECT = [left, bottom, width, height] specifies the location and size of the side of the axis box, relative to the lower-left corner of the Figure window, in normalized units where (0,0) is the lower-left corner and (1.0,1.0) is the upper-right.

axis([XMIN XMAX YMIN YMAX]) sets scaling for the x- and y-axes on the current plot.

axis off turns off all axis labeling, tick marks and background.
axis on turns axis labeling, tick marks and background back on.

plot(X,Y) plots vector Y versus vector X. If X or Y is a matrix, then the vector is plotted versus the rows or columns of the matrix, whichever line up.

plot(Y) plots the columns of Y versus their index.

hold on holds the current plot and all axis properties so that subsequent graphing commands add to the existing graph.

Plot annotations: xlabel('text') adds text beside the X-axis on the current axis. ylabel('text') adds text beside the Y-axis on the current axis. legend(string1,string2,string3, ...) puts a legend on the current plot using the specified strings as labels. title('text') adds text at the top of the current axis.

print -deps2 filename.eps saves the current plot as Encapsulated Level 2 PostScript file

Other plot commands: mesh, surf, bar, hist, ...



Programmierung



Christian Toepfer
Last modified: Tue Apr 25 13:08:41 MET DST 2000 Visits