Borrar filtros
Borrar filtros

How to convert function with elliptic integrals containing symbolic variables to that which contain numerical values?

1 visualización (últimos 30 días)
syms x a
f=(1/sqrt(x*((x^2)-a)))
d=(int(f))
f =
1/(-x*(- x^2 + a))^(1/2)
d =
-(2*a^(1/2)*(-x/a^(1/2))^(1/2)*ellipticF(asin((-x/a^(1/2))^(1/2)), -1)*(1 - x/a^(1/2))^(1/2)*(x/a^(1/2) + 1)^(1/2))/(x^3 - a*x)^(1/2)
How shall I give values to x and a as vectors? I need to plot the function for certain values.

Respuesta aceptada

Torsten
Torsten el 11 de Oct. de 2018
Editada: Torsten el 11 de Oct. de 2018
d_num = matlabFunction(d);
d_num(1,3)
  2 comentarios
dayu
dayu el 22 de Oct. de 2018
Sir, what does 1 and 3 represents? values for x and a? I am getting a result with complex number. But I want real number. What shall I do?
Torsten
Torsten el 22 de Oct. de 2018
Choose x >= sqrt(a) for the interval where you want to integrate the function.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Symbolic Variables, Expressions, Functions, and Preferences en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by