Function Vectorizing using matlab

조회 수: 1 (최근 30일)
imed NASRI
imed NASRI 2014년 1월 7일
댓글: Matt J 2014년 1월 7일
How can I vectorize the following function:
y=sum(u(1:5))+5*min(0,bineq(1)-Aineq(1,:)*transpose(u(1:9)))^2+6*min(0,bineq(2)-Aineq(2,:)*transpose(u(1:9)))^2;
such that u is a (1x9) row vector, bineq is a (2x1) column vector and Aineq is a (2x9) matrix. Thanks.
  댓글 수: 1
Matt J
Matt J 2014년 1월 7일
It looks like it is vectorized. All operations on the RHS that I see are vector operations.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by