Formulation to Matlab code

1 回表示 (過去 30 日間)
Maroco Sc
Maroco Sc 2019 年 9 月 27 日
コメント済み: rough93 2019 年 9 月 27 日
How to write this formulation in Matlab:
form3.JPG
where p = 1; g is a vector; j= length(g); x is a vector
phi = sum( norm(max(0,g)) );
form4.JPG
phi = max( max(0,g) );
are they corect or not?
  1 件のコメント
rough93
rough93 2019 年 9 月 27 日
Ensure your max usage is correct
max(A,B) returns an array with the largest elements taken from A or B.
If this is correct for your application then the sum, norm is correct, you need to raise your first equation to the pth power also.

サインインしてコメントする。

回答 (1 件)

Alex Pedcenko
Alex Pedcenko 2019 年 9 月 27 日
seems OK

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by