numerical partial derivative in MatLab

前端 未结 2 1800
旧时难觅i
旧时难觅i 2020-12-12 01:07

How can I compute the numerical partial derivative of a probability density function (PDF) in Matlab? I\'m not looking for a solution using automatic differences or a symbol

2条回答
  •  再見小時候
    2020-12-12 01:29

    My understanding is that arg and mu are constant and sigma varies. This is an obvious approximation:

    arg = 0;
    mu = 0;
    incr = 0.0001;
    sigma = incr:incr:1.5;
    
    f = normpdf(arg,mu,sigma);
    d = diff(f) / incr;
    plot(sigma(2:end), d, '.')
    set(gca, 'XLim', [0.05 1.5])
    

提交回复
热议问题