-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEasom.m
More file actions
26 lines (22 loc) · 761 Bytes
/
Copy pathEasom.m
File metadata and controls
26 lines (22 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
classdef Easom
%UNTITLED4 Summary of this class goes here
% Detailed explanation goes here
properties
dim =2
end
methods
function y = eval(obj,x)
%UNTITLED4 Construct an instance of this class
% Detailed explanation goes here
y = -cos(x(1)+ pi)* cos(x(2)+pi)* exp(-sum(x.^2))+1;
end
function output = grad(obj,x)
%METHOD1 Summary of this method goes here
% Detailed explanation goes here
output = exp(-sum(x.^2))* cos(fliplr(x)+pi).* (sin(x+pi)+ 2*x.*cos(x+pi) );
end
function output =function_name(obj)
output = 'Easom';
end
end
end