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]
The test suite does not allow for roundoff error.
good point, fixed, thanks
Find common elements in matrix rows
812 Solvers
469 Solvers
363 Solvers
Who knows the last digit of pi?
488 Solvers
Getting the row and column location from a matrix
192 Solvers