⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gmm_display_2d_contour.m

📁 高斯滤波器 matlab toolbox For GMMs and Gaussian kernels
💻 M
字号:
function x = gmm_display_2D_contour(g, prob, N, type)

if nargin == 3, type=1; end
if prob<=0 | prob>1, error('Probability outside (0, 1] bounds'), end

% Sample gmm and evaluate
x = gmm_samples(g, N);
w = gmm_evaluate(g, x);

% Find weights related to each requested prob
ws = sort(w); 
ws = ws(ceil((1-prob)*N));

% Compute contour
switch type
case 1 % convex hull method
    i = find(w >= ws);
    x = x(:,i);
    k = convhull(x(1,:), x(2,:));
    x = x(:,k);
    
case 2 % search method
    xs = x(:, w == ws);
    % increment-length based on curvature
    
otherwise
    error('No other variations implemented')    
end

⌨️ 快捷键说明

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