Borrar filtros
Borrar filtros

How to solve quadratic equations

1 visualización (últimos 30 días)
Jing Hua
Jing Hua el 9 de Ag. de 2012
Hi, I have a few lines of code, really dont know whats wrong with it? Any one?
y=zeros((length(x_cell{1}{1})),1);
x=x_cell{1}{1};
for n=1:length(x)
f(n)=fsolve('(1/238.6318^2)*(x(n)-222.8970)^2+(1/115.8401)^2*(y+95.96210^2)=0','y');
end
Thanks
Jing

Respuestas (1)

Andrei Bobrov
Andrei Bobrov el 9 de Ag. de 2012
try
syms x y;
f = solve((1/238.6318^2)*(x-222.8970)^2+(1/115.8401)^2*(y+95.96210^2),y);
f1 = matlabFunction(f);
out = f1(x);

Categorías

Más información sobre Quadratic Programming and Cone Programming 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