-2
power = 2;


sigma=0.1;

a = 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 everything in my limited matlab knowledge and google searching to find an answer to the error that comes up:

Error using integral2

First input argument must be a function handle.

Fiver
  • 9,909
  • 9
  • 43
  • 63

1 Answers1

0

You need pass in anonymous functions for the first argument. Create them using the @ sign. For more details, check out these links

http://www.mathworks.com/help/matlab/matlab_prog/anonymous-functions.html

Using integral2 in Matlab with vectors

Community
  • 1
  • 1
jordyyy
  • 54
  • 1
  • 7