## Expert Answer

Code:

%Define value of a

a = 1;

%Define value of c

c = 2;

%Define value of d

d = 3;

%Define value of h

h = 4;

%Define value of k

k = 5;

%Define value of s

s = 10;

%Define value of theta1

theta1 = 90;

%Define value of phi

phi = 45;

%Define value of theta

theta = 60;

%Compute Px

Px = (a+c)*cos(theta1) + (d+h)*sin(theta) + k*sin(theta1+phi)

%Compute Py

Py = s + (a+c)*sin(theta1) + (d+h)*sin(theta) + k*sin(theta1+phi)

%Define value of Pix

Pix = 0.3;

%Define value of Piy

Piy = 0.4;

%Compute Error

E = ((Px-Pix)^2+(Py-Piy)^2)