Navigation

Operators and Keywords

Function List:

C++ API

peaks.m File Reference


Functions

 elseif (nargin==1) if length(x) > 1 y
endif endif if (isvector(x)&&isvector(y))[X
 if (nargout==0) surf(x
 elseif (nargout==1) X_out

Variables

 function [X_out, Y_out, Z_out]
else x = y = linspace (-3, 3, x)
endif endif Y = meshgrid (x, y)
else X = x
endif Z
 y
else X_out = X
 Y_out = Y
 Z_out = Z

Function Documentation

elseif ( nargout  = =1  ) 

elseif ( nargin  = =1  ) 

if ( nargout  = = 0  ) 

endif endif if ( isvector(x)&&isvector(y)   ) 


Variable Documentation

Initial value:

 peaks (x, y)

  if (nargin == 0)
    x = y = linspace (-3, 3, 49)

else X = x

else x = y = linspace (-3, 3, x)

else X_out = X

y

Y = meshgrid (x, y)

Y_out = Y

Z

Initial value:

 3 * (1 - X) .^ 2 .* exp(- X .^ 2 - (Y + 1) .^ 2) 
      - 10 * (X / 5 - X .^ 3 - Y .^ 5) .* exp(- X .^ 2 - Y .^ 2) 
      - 1 / 3 * exp(- (X + 1) .^ 2 - Y .^ 2)

Z_out = Z