Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. syms xo; syms x;
  2. syms yo; syms y;
  3. f_zerowe = [2*yo+4*xo*yo; 1+2*xo+2*xo^2-2*yo^2];
  4. f_pierwsze = [diff(1+2*xo+2*xo^2-2*yo^2+j*(2*yo+4*xo*yo),xo), diff(1+2*xo+2*xo^2-2*yo^2+j*(2*yo+4*xo*yo),yo)]*[x;y];
  5. f_drugie = 0.5*[x,y]*hessian(1+2*xo+2*xo^2-2*yo^2+j*(2*yo+4*xo*yo), [xo,yo])*[x;y];
  6. cale = f_zerowe + f_pierwsze + f_drugie
  7.  
  8. % wstawiamy zmienne
  9. pom = subs(cale,xo,0);
  10. pom = subs(pom, x, 0);
  11. pom = subs(pom, yo, 0);
  12. pom = subs(pom, y, 0);
  13. pom'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement