Definite integral

Problem description

I want to test some definite integral with this comand “integral(@(x) x.^2,0,1)”
and the system says
“error: called from
integral at line 2 column 1”

can someone help me?

My system

  • OS: e.g. **Windows 7
  • Octave version: e.g. Version 5.2.0

I obtain 0.333, as expected, both Octave 5.2 and 6.2:

octave:1> integral(@(x) x.^2,0,1)
ans = 0.3333

The fact that you obtain an error at line 2 without a more specific error message is suspicious to me. Did you redefine the integral function?
What does which integral return?