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 Center および File ExchangeSimulink についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by