matlab 中 peaks(50) 是什么意思,产生什么数据,为什么了(在线等!)

来源:百度知道 编辑:UC知道 时间:2024/05/17 20:41:00
matlab 中 peaks(50) 是什么意思,产生什么数据,为什么了
是Z=peaks(50)还有z=spere(50)

看看源程序就明白了。

>> type peaks

function [xz,y,z] = peaks(arg1,arg2)
%PEAKS A sample function of two variables.
% PEAKS is a function of two variables, obtained by translating and
% scaling Gaussian distributions, which is useful for demonstrating
% MESH, SURF, PCOLOR, CONTOUR, etc.
% There are several variants of the calling sequence:
%
% Z = PEAKS;
% Z = PEAKS(N);
% Z = PEAKS(V);
% Z = PEAKS(X,Y);
%
% PEAKS;
% PEAKS(N);
% PEAKS(V);
% PEAKS(X,Y);
%
% [X,Y,Z] = PEAKS;
% [X,Y,Z] = PEAKS(N);
% [X,Y,Z] = PEAKS(V);
%
% The first variant produces a 49-by-49 matrix.
% The second variant produces an N-by-N matrix.
% The third variant produces an N-by-N matrix where N = length(V).
% The fourth variant evaluates the function at the given X and Y,
% which must be t