필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

how to plot non-quadratic function

조회 수: 1 (최근 30일)
RAHUL KUMAR
RAHUL KUMAR 2019년 9월 29일
마감: Matt J 2019년 9월 30일
x0=[2,0];
fun=@(x) x(1)^3-16*x(1)+2*x(2)-3*x(2)^2 %this is my objective function
x = fminsearch(fun,x0)
contour(fun,[-5 5])
When i plot this function i'm getting this error "Input arguments must be numeric or objects which can be converted to double."
Can anyone tell, what is the problem
  댓글 수: 2
Rik
Rik 2019년 9월 29일
What do you mean with a contour if you only have a function of one variable? It usually only makes sense to talk about contours if you have a function of two variables.
You error occurs because ezcontour expects a function with two inputs.
RAHUL KUMAR
RAHUL KUMAR 2019년 9월 29일
so which command i use for contour plot

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by