Conditional Statements - MATLAB & Simulink - MathWorks
https://www.mathworks.com/help/matlab/matlab_prog/conditional-statements.html
WEBThe simplest conditional statement is an if statement. For example: % Generate a random number. a = randi(100, 1); % If it is even, divide by 2. if rem(a, 2) == 0. disp('a is even') b = a/2; end. if statements can include alternate choices, using the optional keywords elseif or else . For example: a = randi(100, 1); if a < 30. disp('small')
DA: 95 PA: 63 MOZ Rank: 50