近接写像のプロット

近接写像のMATLABプロット関数を作成しました。

役立ちますか?

function proxplot(f,varargin)
%PROXPLOT Plot prox of a scalar function
% Example
% >> proxplot(@(x) abs(x))
% See FPLOT

% Copyright (c) 2017 Shogo MURAMATSU,
% All rights reserved
warning off
prox = @(x) fminsearch(@(y) (f(y)+0.5*(y-x)^2),0);
fplot(@(x) prox(x),varargin)
warning on