Effacer les filtres
Effacer les filtres

How to Invert functions with same input variables?

2 vues (au cours des 30 derniers jours)
Ajay Goyal
Ajay Goyal le 18 Jan 2016
Commenté : Ajay Goyal le 18 Jan 2016
Dear Sirs, I want to invert following set of equations:
Y(i)=a(i)X1+b(i)X2+c(i)X3+d(i)X1X2+e(i)X1X3+f(i)X2X3+g(i)X1^2+h(i)X2^2+i(i)X3^2     i=[1,4]
It consists of four outputs (Y1-Y4), 3 inputs (X1-X3), and (9*4) coeff.
I intend to generate X1,X2,X3=function(Y1,Y2,Y3,Y4).i.e. Equations of X1,X2,X3. We may assume coefficients of your choice to simplify the solution. Please help me with possible guidance.
  2 commentaires
Torsten
Torsten le 18 Jan 2016
So you have 4 equations in 3 unknowns.
Use nonlinear regression to solve for X1, X2 and X3 (e.g. using lsqcurvefit).
Best wishes
Torsten.
Ajay Goyal
Ajay Goyal le 18 Jan 2016
Sir, can you please help me with an example. As I am unable to understand your comment properly.

Connectez-vous pour commenter.

Réponse acceptée

Torsten
Torsten le 18 Jan 2016
a=...;
b=...;
c=...;
d=...;
e=...;
f=...;
g=...;
h=...;
i=...;
y=...;
fun=@(x) a*x(1)+b*x(2)+c*x(3)+d*x(1)*x(2)+e*x(1)*x(3)+f*x(2)*x(3)+g*x(1)^2+h*x(2)^2+i*x(3)^2-y;
x0=[1 1 1];
sol=lsqnonlin(fun,x0);
Best wishes
Torsten.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by