Cody

Problem 486. Surface Fit z(x,y)

Given three vectors x,y,z. Find four coefficients c = [cxx cxy cyy c00], such that z = cxx*x.^2+cxy*x.*y+cyy*y.^2+c00.

For example,

 x = [ 0  0  1  1  2  2  3  3]
 y = [ 0  1  0  1  0  1  0  1]
 z = [-4 -1 -3 -2  0 -1  5  2]

then

 z = x.^2-2*x.*y+3*y.^2-4 

and

 c = [cxx cxy cyy c00] = [1 -2 3 -4]

Solution Stats

52.11% Correct | 47.89% Incorrect
Last solution submitted on Mar 19, 2016

Problem Comments

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more