Advertisement
Guest User

Untitled

a guest
May 24th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. function y = f_bar(x1,x2)
  2.  
  3. b = [1 1 1 1 1 1]';
  4. A = [0.4873 -0.8732
  5. 0.6072 0.7946
  6. 0.9880 -0.1546
  7. -0.2142 -0.9768
  8. -0.9871 -0.1601
  9. 0.9124 0.4093];
  10.  
  11. if sum(b-A*[x1;x2]<0) == 0
  12. y = -sum(log(b-A*[x1;x2]));
  13. else
  14. y =NaN;
  15. end
  16.  
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement