Azzera filtri
Azzera filtri

system of equations with elliptical integrals

1 visualizzazione (ultimi 30 giorni)
Nikhil
Nikhil il 5 Nov 2013
Risposto: Walter Roberson il 5 Nov 2013
Hello all,
I want to solve for 3 variables x,y,z. Three equations for these variables are as follows:
m=1-1/(x^2);
[Ki Ei]=ellipke(m);
eq1='((x^2+1)*z-y*2)/((x^2-1)*z)=0.9408';
eq2='y=Ki';
eq3='z=Ei';
[x0, y0, z0]=solve(eq1,eq2,eq3);
eq2 and eq3 are complete elliptical integrals of first and second kind. I have defined these integrals as variables because these are used in eq1. after running above code I am getting following error:
??? Error using ==> ellipke at 34 Inputs must be floats, namely single or double.
Can somebody suggest me what errors I am making in the code?? My aim is to solve for x,y,z. I have solved this using fsolve which requires initial guess of the solution. I want to solve for x,y,z without initial guess of the solution
Thanks in advance,
Nikhil

Risposte (1)

Walter Roberson
Walter Roberson il 5 Nov 2013
Instead of writing 'A=B' use (A)-(B) without quotes.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by