필터 지우기
필터 지우기

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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by