0

I'm trying to do a partial derivative, but I'm stuck when trying to use the complete elliptic integrals of the first and the second kind. I get the error in the title

Here is my code :

syms X Y;
k = X * Y;
[K, E] = ellipke(k)
    ??? Error using ==> ellipke at 34
    Inputs must be floats, namely single or double.
F = E*X + K
diff(F, X)

Is there something I didn't understand? As for now, it seems that I can only have values and not variables for the ellipke functions. Does that mean I have to implement my own elliptic function? I'm new to matlab so any advice is welcome.

asdfasdf
  • 774
  • 11
  • 29
  • 1
    What version of the Symbolic Toolbox do you have? The symbolic version of [`ellipke`](http://www.mathworks.com/help/symbolic/ellipke.html?refresh=true#zmw57dd0e44727) was added in the R2013a release. – TroyHaskin Jun 22 '15 at 17:56
  • oh well, R2010b. Thank you for your fast answer! – asdfasdf Jun 22 '15 at 17:58
  • With R2010b you'll with need to perform the derivative numerically (see [here](http://stackoverflow.com/a/20257710/2278029) or [here](http://stackoverflow.com/a/20614488/2278029)) or try calling one of [MuPAD's elliptic integral functions](http://www.mathworks.com/help/releases/R2010b/toolbox/mupad/stdlib/elliptic.html), which existed back then. Here's [the current (R2015a) documentation](http://mathworks.com/help/symbolic/calling-mupad-functions-from-matlab.html) for calling MuPAD functions from within Matlab. [See also](http://stackoverflow.com/a/28241621/2278029). – horchler Jun 22 '15 at 18:14

0 Answers0