What is the equivalence for the Big M in MATLAB?
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
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])
min([NaN NaN Inf NaN])
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!