Objective function with 1,000 variables

Hello, I want to write an objective function which is composed of 1,000 variables. Can someone help me to do this. (My objective function is the following: r1+r2+...+r1000). Thank in advance. Hiba.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 9월 28일

0 개 추천

Assuming that your coefficients are presented as row vectors, and that you might have multiple rows representing different locations being sampled:
objfun = @(x) sum(x,2);

카테고리

도움말 센터File Exchange에서 System Composer에 대해 자세히 알아보기

질문:

2015년 9월 28일

답변:

2015년 9월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by