how to plot test function graph?

조회 수: 4 (최근 30일)
siti fairuz
siti fairuz 2012년 5월 28일
hello.. i juz wanna ask , using this function how to plot its 2D graph?
function f = dropwavefcn(x)
if strcmpi(x,'init')
f.PopInitRange = [-2;2] ;
f.KnownMin = [0 0] ; % For plotting purposes only
else
if size(x,2) > 2
warning('psopt:demos:toomanydims',...
'Only using first two dimensions of search space')
elseif size(x,2) < 2
error('Drop Wave Function requires two dimensions')
end
x = reshape(x,1,[]) ;
f = -(1 + cos(12*norm(x(1:2))))/(0.5*x(1:2)*x(1:2)'+2) ;
end
i really need the answer as soon as possible...thanks for your concern
  댓글 수: 1
Oleg Komarov
Oleg Komarov 2012년 5월 28일
http://www.mathworks.com/matlabcentral/answers/29922-why-your-question-is-not-urgent-or-an-emergency

댓글을 달려면 로그인하십시오.

답변 (1개)

Oleg Komarov
Oleg Komarov 2012년 5월 28일
plot(x,dropwavefcn(x))
  댓글 수: 1
Oleg Komarov
Oleg Komarov 2012년 5월 28일
@siti: does this answer your question?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Networks에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by