필터 지우기
필터 지우기

How do I take the following equation and put it into Matlab form?

조회 수: 1 (최근 30일)
I am trying to evaluate an objective function and trying to figure out how to translate this into Matlab form.
I know I have to do a loop somewhere but just can't figure out how to start. Any guidance would be really really appreciated.
Essentially k = 1: 5 and j = 1:J and n = 1:N
  댓글 수: 3
David Hill
David Hill 2020년 9월 3일
Where does Pj fit into the equation?
sree chak
sree chak 2020년 9월 3일
Thank you for the question. You can ignore the Pj.

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

채택된 답변

Walter Roberson
Walter Roberson 2020년 9월 3일
abs(Gkj - sum(f(c(1:N)) .* gkj(X(1:N))))
provided that f and gkj are vectorized functions.
If they are not, then
fv = @(C) arrayfun(@f, C);
gkjv = @(C) arrayfun(@gkj,C);
abs(Gkj - sum(fv(c(1:N)) .* gkjv(X(1:N))))

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by