peaks,peak什么意思啊

将乐信息网 http://www.jianglexinxi.cn 2020-07-15 09:59 出处:网络
peaks,peak什么意思啊,peaks函数用法 % PeaksLabel.m Z=peaks(30); % Z: 30*30 double matrix; % Look for the highest point;

peaks,peak什么意思啊,peaks函数用法

peaks,peak什么意思啊

peaks,peak什么意思啊

% PeaksLabel.m
Z=peaks(30); 
% Z: 30*30 double matrix;
% Look for the highest point;
zmax=max(Z);
Zmax=max(zmax);
% Firstly find the maximum of 30 columns,return zmax~1x30
% Secondly find the maximum of zmax, return 1x1
[Ymax, Xmax]=find(Z==Zmax);
% Y is first parameter using find()
zmin=min(Z);
Zmin=min(zmin);
[Ymin,Xmin]=find(Z==Zmin);
% plot func Z;
mesh(Z);hold on;
% label maximum and minimum point
plot3(Xmax,Ymax,Zmax,'k.','markersize',20);hold on
plot3(Xmin,Ymin,Zmin,'k.','markersize',20);hold on
text(Xmax,Ymax,Zmax,['max_value=',num2str(Zmax)])
text(Xmin,Ymin,Zmin, ['min_value=',num2str(Zmin)])

最终的效果图:

peaks,peak什么意思啊

本文标题:peaks,peak什么意思啊
http://www.jianglexinxi.cn/yanergaozhi/418522.html

0

精彩评论

暂无评论...
验证码 换一张
取 消