フィルターのクリア

What is the equivalence for the Big M in MATLAB?

2 ビュー (過去 30 日間)
Sherwin
Sherwin 2022 年 4 月 26 日
回答済み: Voss 2022 年 4 月 26 日
Hi, If I want to assign a really big number to a matrix so that when I want to take the minimum of the vector then that element is never chosen what should I do? In math we usually use the Big M in consitraints which stands for a really big number.

採用された回答

Voss
Voss 2022 年 4 月 26 日
Sounds like you want Inf (infinity)
% Inf is not the minimum of the vector, as long as there
% are some finite number (non-Inf and non-NaN) elements
min([1 2 Inf 4])
ans = 1
min([NaN NaN Inf NaN])
ans = Inf

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by