How to get equation of a curve plotted using( z=ax^2+by^2).

2 views (last 30 days)
Can anyone tell me a method by which i could get back the bi-quadratic equation using which i have generated data points for the curve z=a.x^2+b.y^2.Please guide me

Answers (1)

Roger Stafford
Roger Stafford on 13 Mar 2017
Edited: Roger Stafford on 13 Mar 2017
Assuming you have generated the data points accurately, you need only two data points (x1,y1,z1) and (x2,y2,z2) to retrieve your a and b coefficients. Just solve the two simultaneous linear equations in a and b, x1*a+y1*b=z1 and x2*a+y2*b=z2:
[x1,y1;x2,y2]\[z1;z2];
The result should be [a;b].
[Note: It strikes me as curious that you could so easily lose those two coefficients after making use of them for generating the data.]

Categories

Find more on Linear and Nonlinear Regression in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!