Differentiation of non-linear polynomial

2 views (last 30 days)
bayoishola20
bayoishola20 on 17 Feb 2015
Edited: bayoishola20 on 17 Feb 2015
Please the differential part gives giving me empty curly brackets instead of values in this code set.
% Initial x1 and x2
x1 = 5, x2 = 4
% Equations
y1 = (x1-3)^2 + (2*x2 - 8)^2
y2 =(x1-4)^2 + (x2 - 10)^2
%Given y values
y = [5;49]
% First set of y values
yo = [y1;y2]
f = y - yo
A11 = diff(poly((x1-3)^2 + (2*x2 - 8)^2),x1)
A12 =diff(poly((x1-3)^2 + (2*x2 - 8)^2),x2)
A21 =diff(poly((x1-4)^2 + (x2 - 10)^2),x1)
A22 =diff(poly((x1-4)^2 + (x2 - 10)^2),x2)
I was expecting to see this:
or

Answers (0)

Categories

Find more on Polynomials 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!