MATLAB: How to switch the value of a boolean. boolean Hi, is there any function to do the following : a = true;b = someFunction(a) ==> b = falseb = sumeFunction(b) ==> b = true; thank you. Best Answer b = ~a;c = ~b;or if you are looking for the functional formb = not(a);c = not(b); Related SolutionsMATLAB: Transfer a matrix in a quick way If you want to preserve each 4x3 block, you could try something like this:B = reshape(A(:, [1:3:end, 2:3:end, 3:3:end]), [], 3 ); MATLAB: Boolean style switch-case statements Hi,See here:https://de.mathworks.com/help/matlab/ref/switch.html?s_tid=doc_taThere you'll find a lot of information related to your question.Best regardsStephan Related QuestionHow to Shorten This Logical ExpressionSwitch
Best Answer