Square of Objective function expression gives an error

조회 수: 1 (최근 30일)
pradeep kumar
pradeep kumar 2018년 11월 11일
댓글: pradeep kumar 2018년 11월 11일
Hi experts, I have just started doing optimization in the problem-based workflow. I refer to this documentation page, in order to formulate my own Non-Linear Objective function.
But when I run the following code,
obj = sum(residual.^2);
It produces the following error.
Undefined operator '.^' for input arguments of type 'optim.problemdef.OptimizationExpression'.
I am using MATLAB R2018a. My actual objective function expression is a bit complicated and I need to understand this error before I proceed further.
Your help will be highly appreciated. Thanks in advance!
  댓글 수: 2
Walter Roberson
Walter Roberson 2018년 11월 11일
The abilities of problem based optimization expanded in R2018b, you might be using too old of a version.
pradeep kumar
pradeep kumar 2018년 11월 11일
@ Walter Roberson, Thank you for your response. I will check that out in R2018b.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by