Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ogranicenja
- function [c, ceq]=consti(x)
- c=[x(1).^2*x(2)-1;
- x(1).^2-x(2)+2];
- ceq=[];
- end
- Funkcija
- function y = alki(x)
- n=2;
- y=0;
- for i=1:n
- y=y+20+exp(1)-20*exp((-1/5)*sqrt((1/n)*x(i).^2))-exp((1/n)*cos(2*pi*x(i)));
- end
- end
- [x1 x2]=meshgrid(-20:0.1:20)
- y=x1^2 + x2^2 +///uglavnom pises funkciju
- mesh(x1,x2,y)
- gatool
- @imefunkcije
- n
- ..
- 1e^-5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement