Is this code(in mat lab function block) correct for the attached logic?

조회 수: 1 (최근 30일)
siv1
siv1 2019년 12월 23일
댓글: Asvin Kumar 2019년 12월 26일
[~,k2]=sort(g,'ascend');
[~,k1]=sort(h,'ascend');
k3=k1+k2;
k=k3/2;
[~,fx_opt]=min(k);
  댓글 수: 1
Asvin Kumar
Asvin Kumar 2019년 12월 26일
Looks good.
Please note that MATLAB uses 1-based indexing while you require 0-based indexing. However, this won't affect the output of fx_opt because all values are off-shifted by 1.

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

답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by