clc clear syms x y z r1 r2 w f=x^+y^+z^+w^; g1=*x-y+z-w-; g2=x+y-z+w-; h=f-r1*g1 -r2*g2; hx=diff(h,x); hy=diff(h,y); hz=diff(h,z); hw=diff(h,w); hr1=diff(h,r1); hr2=diff(h,r2); r=solve([hx==,hy==,hz==,hw==,hr1==,hr2==],[x,y,z,w,r1,r2]); arr_x=double(