matlab - numerical double integral function handle -
matlab - numerical double integral function handle -
power = 2; sigma=0.1; = 1 /(sigma*sqrt(2*pi)); c= (sigma^2)*2; syms x y f = exp(-(x.^power)./c); dfdx = diff(f,x); c1 = diff(dfdx,x); f = exp(-(y.^power)./c); dfdy = diff(f,y); c2 = diff(dfdy,y); meancurvature = (c1 + c2)./ 2; gaussiancuravture =(c1 .* c2); mean_curv = integral2(meancurvature, -inf,+inf, -inf, +inf) gauss_curv = integral2(gaussiancurvature, -inf,+inf, -inf, +inf)
i've tried in limited matlab knowledge , google searching find reply error comes up:
error using integral2
first input argument must function handle.
you need pass in anonymous functions first argument. create them using @ sign. more details, check out these links
http://www.mathworks.com/help/matlab/matlab_prog/anonymous-functions.html
using integral2 in matlab vectors
matlab double numerical integral
Comments
Post a Comment