pp_edges_from_samples.m

来自「基于Matlab的地震数据处理显示和测井数据显示于处理的小程序」· M 代码 · 共 25 行

M
25
字号
function edges=pp_edges_from_samples(samples,nedges)% Create edge vector from sample vector for histogram computation% Written by: E. R.: June 26, 2003% Last updated: July, 30, 2003: Change order of input arguments%%          edges=pp_edges_from_samples(samples,nedges)% INPUT% samples  samples from which to compute the edges% nedges   number of edges (number of bins for histogram +1)% OUTPUT% edges    column vector of edges of histogram binssampleMin=min(samples(:));sampleMax=max(samples(:));if sampleMax >= 0   sampleMax=sampleMax*(1+2*eps);else   sampleMax=sampleMax*(1-2*eps);endif sampleMin*sampleMax < 0;   sampleMax=max(-sampleMin,sampleMax);   sampleMin=-sampleMax;endedges=linspace(sampleMin,sampleMax,nedges)';

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?