Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
26
Добавлен:
09.02.2015
Размер:
500.22 Кб
Скачать

Inputs.

EZGRAPH3(PLOTFUN,FUN,[XMIN,XMAX,YMIN,YMAX]) plots over the specified

domain.

EZGRAPH3(PLOTFUN,...,DOMSTYLE) specifies DOMSTYLE. DOMSTYLE can be

'rect' or 'circ'.

EZGRAPH3(PLOTFUN,...,Npts) uses a grid of Npts-by-Npts points.

EZGRAPH3(PLOTFUN,FUNX,FUNY,FUNZ) plots the parametric surface

FUNX(S,T), FUNY(S,T), and FUNZ(S,T) over the square -2*PI < S < 2*PI

and -2*PI < T < 2*PI.

EZGRAPH3(PLOTFUN,FUNX,FUNY,FUNZ,[SMIN,SMAX,TMIN,TMAX]) or

EZGRAPH3(FUNX,FUNY,FUNZ,[A,B]) uses the specified domain.

EZGRAPH3(AX,...) plots into AX instead of GCA.

H = EZGRAPH3(...) returns handles to the plotted objects in H.

See also ezplot, ezplot3, ezpolar, ezmesh, ezmeshc, ezsurf,

ezsurfc, ezcontour, ezcontourf.

<ezmesh> - Easy to use 3-D mesh plotter.

EZMESH Easy to use 3-D mesh plotter

EZMESH(FUN) plots a graph of FUN(X,Y) using MESH. FUN is plotted over

the default domain -2*PI < X < 2*PI and -2*PI < Y < 2*PI.

EZMESH(FUN,DOMAIN) plots FUN over the specified DOMAIN instead of the

default domain. DOMAIN can be the vector [XMIN,XMAX,YMIN,YMAX] or the

vector [A,B] (to plot over A < X < B and A < Y < B).

EZMESH(FUNX,FUNY,FUNZ) plots the parametric surface FUNX(S,T),

FUNY(S,T), and FUNZ(S,T) over the domain -2*PI < S < 2*PI and

-2*PI < T < 2*PI.

EZMESH(FUNX,FUNY,FUNZ,[SMIN,SMAX,TMIN,TMAX]) or

EZMESH(FUNX,FUNY,FUNZ,[A,B]) uses the specified domain.

EZMESH(...,N) plots the function over the default domain using an

N-by-N grid. The default value for N is 60.

EZMESH(...,'circ') plots the function over a disk centered on the

domain.

EZMESH(AX,...) plots into AX instead of GCA.

H = EZMESH(...) returns a handle to the plotted object in H.

Examples:

The easiest way to express a function is via a string:

ezmesh('x*exp(-x^2 - y^2)')

One programming technique is to vectorize the string expression using

the array operators .* (TIMES), ./ (RDIVIDE), .\ (LDIVIDE), .^ (POWER).

This makes the algorithm more efficient since it can perform multiple

function evaluations at once.

ezmesh('x.*exp(-x.^2 - y.^2)')

You may also use a function handle to an existing function. Function

handles are more powerful and efficient than string expressions.

ezmesh(@peaks)

EZMESH plots the variables in string expressions alphabetically.

subplot(1,2,1), ezmesh('exp(-x).*cos(t)',[-4*pi,4*pi,-2,2])

To avoid this ambiguity, specify the order with an anonymous function:

subplot(1,2,2), ezmesh(@(x,t)exp(-x).*cos(t),[-2,2,-4*pi,4*pi])

If your function has additional parameters, for example k in myfun:

%-----------------------%

function z = myfun(x,y,k)

z = - x.^k - y.^k;

%-----------------------%

then you may use an anonymous function to specify that parameter:

ezmesh(@(x,y)myfun(x,y,2))

See also ezplot, ezplot3, ezpolar, ezcontour, ezcontourf, ezsurf,

ezsurfc, ezmeshc, mesh, vectorize, function_handle.

Overloaded methods:

sym/ezmesh

Reference page in Help browser

doc ezmesh

<ezmeshc> - Easy to use combination mesh/contour plotter.

EZMESHC Easy to use combination mesh/contour plotter

EZMESHC(FUN) plots a graph of FUN(X,Y) using MESHC. FUN is plotted over

the default domain -2*PI < X < 2*PI and -2*PI < Y < 2*PI.

EZMESHC(FUN,DOMAIN) plots FUN over the specified DOMAIN instead of the

default domain. DOMAIN can be the vector [XMIN,XMAX,YMIN,YMAX] or the

vector [A,B] (to plot over A < X < B and A < Y < B).

EZMESHC(FUNX,FUNY,FUNZ) plots the parametric surface FUNX(S,T),

FUNY(S,T), FUNZ(S,T) over the domain -2*PI < S < 2*PI and

-2*PI < T < 2*PI.

EZMESHC(FUNX,FUNY,FUNZ,[SMIN,SMAX,TMIN,TMAX]) or

EZMESHC(FUNX,FUNY,FUNZ,[A,B]) uses the specified domain.

EZMESHC(...,N) plots the function over the default domain using an

N-by-N grid. The default value for N is 60.

EZMESHC(...,'circ') plots the function over a disk centered on the

domain.

EZMESHC(AX,...) plots into AX instead of GCA.

H = EZMESHC(...) returns handles to plotted objects in H.

Examples:

The easiest way to express a function is via a string:

ezmeshc('x*exp(-x^2 - y^2)')

One programming technique is to vectorize the string expression using

the array operators .* (TIMES), ./ (RDIVIDE), .\ (LDIVIDE), .^ (POWER).

This makes the algorithm more efficient since it can perform multiple

function evaluations at once.

ezmeshc('x.*exp(-x.^2 - y.^2)')

You may also use a function handle to an existing function. Function

handles are more powerful and efficient than string expressions.

ezmeshc(@peaks)

EZMESHC plots the variables in string expressions alphabetically.

subplot(1,2,1), ezmeshc('exp(-x).*cos(t)',[-4*pi,4*pi,-2,2])

To avoid this ambiguity, specify the order with an anonymous function:

subplot(1,2,2), ezmeshc(@(x,t)exp(-x).*cos(t),[-2,2,-4*pi,4*pi])

Соседние файлы в папке Библиотеки Matlab